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 usage analysis in datastage?
how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.
how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?
How a source file is populated?
What are the important features of datastage?
Define meta stage?
Explain the situation where you have applied SCD in your project?
What are the differences between datastage and informatica?
Differentiate between datastage and informatica?
What are stage variables, derivations and constants?
whom do you report?
how to get sum of sal based on dept_no and then sum of all sal irrespective of dept_no in same sql. output:- 10, 200(sum of sal for dept_no 10), 5000(sum of all sal)
how do u catch bad rows from OCI stage? And what CLI stands for?
Notification Activity
Explain ibm infosphere information server and highlight its main features?