source : col1 101 101 101 102 102 102 103 103 103
col2 1000 1500 2000 1200 2300 3000 2400 1300 2000
i need target as
col1 101 102 103
col2 1000,1500,2000 1200,2300,3000 2400 1300 2000
Answers were Sorted based on User's Feedback
Answer / s
INPUT
col1 col2
101 1000
101 1500
101 2000
102 1200
102 2300
102 3000
103 2400
103 1300
103 2000
OUTPUT
col1 col2
101 1000,1500,2000
102 1200,2300,3000
103 2400,1300,2000
SOURCE->SRT->EXP->TGT
SRT - Sort by column col1.
EXP - col1
col2
v_col2=iif(v_col1=col1,v_col2||','||col2,col2)
v_col1=col1
o_col1=v_col1
o_col2=v_col2
Is This Answer Correct ? | 11 Yes | 3 No |
Answer / john coder
i believe, we need an aggregator to pick up the last row for
a particular deptno.
Otherwise, there will be three rows inserted...
col1 col2
101 1000
101 1000,1500
101 1000,1500,2000
by having an aggregator with groupby on col1, we can pick up
the last row by either using LAST or MAX.
Is This Answer Correct ? | 8 Yes | 0 No |
SQ-->SRT-->EXP-->AGG-->TGT
In SRT:
sort the record by col1 (Ascending)
In Exp:
col1
col2
v_col2=iif(v_col1=col1,v_col2||','||col2,col2)
v_maxcount=iif(v_col1=col1,v_maxcount+1,1)
v_col1=col1
o_col1=v_col1
o_col2=v_col2
o_maxcount=v_maxcount
In AGG:
Group by o_col1
MAX(o_maxcount)
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / venky
src->exp->agg->tgt
exp transformation
col1
col2
var1=iff(var2=col1,var1||','||col2,col2)
var2=col1
output=var1
agg transformatiom
col1 select group
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / anoymous
If the source is Relational then source qualifier can be
overridden
Select Col1, Concat('col1',',','col2') from table name
groupby col1;
Is This Answer Correct ? | 0 Yes | 4 No |
Answer / kiran
USE SOTER TR . IN SORTER TR CLICK ON DISTINCT OPTION IT ELIMINATE THE DUPLICATE AS WELL AS SORT THE ORDER.
Is This Answer Correct ? | 0 Yes | 4 No |
difference between top down(w.h inmon)and bottom up(ralph kimball)approach?
Explian the connected and unconnected lookup transformation
What is factless fact schema?
How i can upload the MainFrame source For Informatica ?
Why do we use DSS database for OLAP tools?
How do you do error handling in Informatica?
What is a dimensional model?
Q. We are the loading the table on daily basis it is incremental loading. and A person rahul slary was 10000, so if i check before run my salalr is 10000. but toay there is update that my sal is 15k but that will come to know after the load. braod crtiteria is we donot want to show downstream teams partial updated data. need aproad as etl developer
Informatica and datawarehousing courses in Pune?
I have source like this 1:2;3. so i want to load the target as 123
Router T/R is active but some people are saying it is also passive which is exactly right?
Can i create a lookup table without cache.