Question
4)
source target
c1 c1 c2 c3
c2 c4 c4 c5
c3 c6 c7
c4
c5
c6
c7
Singal Source and Singal Target only subash,
Answer Posted / subhash
1. SRC---->TFM---->PIVOT Stage---->TGT
If source is seq file add the ROW NUM column also.
If source is Oracle select ROWNUM column also.
then our input look like this:
COL1 COL2
C1 1
C2 2
C3 3
c4 4
c4 5
c5 6
c6 7
C7 8
in TFM,
put below condition for Col2 derivation.
If COL2<4 AND COL2>0 then 1 elseIf COL@>3 AND COL2<7 then 2 else 3
then out from tranformer looks like this
COL1 COL2
C1 1
C2 1
C3 1
c4 2
c4 2
c5 2
c6 3
C7 3
then do the Vertical PIVOT on
GROUP BY COL2,
PIVOT COL1
then u will get below output:
Col2 COL1_1 COL1_2 COL1_3
1 c1 c2 c3
2 c4 c4 c5
3 c6 c7
we can drop COL2 in TGT
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
EXPLAIN SCD
Differentiate between datastage and datastage tx?
What is the difference between hashfile and sequential file?
how to read 100 records at a time in source a) hw is it fr metadata Same and b) if metadata is nt same?
Can you implement SCD2 using join, transformer and funnel stage?
Why do you need stage variables?
Notification Activity
why do u need the IOS upgradation in a FC switch
how to add a new records into source?
Differentiate between datastage and informatica?
What is datastage engine?
How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?
Define ds designer?
What is difference between server jobs & parallel jobs?
Difference between IBM DATA STAGE8.5 and DATA STAGE9.1 ?