✍ Kashif M
Trends

Sunday, 26 January 2014


Convert multiple rows to single row (multiple columns) in Informatica


By on January 26, 2014





          We take for eg:
Source

Sid
code
value
1
A
ABC
1
B
BCD
1
C
CCD
2
A
SDC
2
C
ASD
3
D
DFG
           
            Target
Sid
code A
code B
code C
code D
1
abc
bcd
ccd
<null>
2
sdc
<null>
asd
<null>
3
<null>
<null>
<null>
dfg
                       





The flow of mapping is

Sq->Agg->Tgt1, tg2, tgt3…
Use Aggregator
Create Four Ports each having
MAX (DECODE (CODE,'A', VALUE)),
MAX (DECODE (CODE,'B', VALUE)),
MAX (DECODE (CODE,'A', VALUE)),
MAX (DECODE (CODE,'D', VALUE))
Group it by SID
 Connect those Four Columns to respective Target Columns

Kashif
mkashu: Convert multiple rows to single row (multiple columns) in Informatica
Review : Kashif | Kashif
Update: January 26, 2014 | Rating: 4.5

Comment for "Convert multiple rows to single row (multiple columns) in Informatica"

0 comments

Post a Comment

Blog Archive