I have 2 Files like
fileA fileB Output1 Output2 Output3
1 6 1 6 11
2 7 2 7 12
3 8 3 8 13
4 9 4 9 14
5 10 5 10 15
6 11
7 12
8 13
9 14
10 15

please let know

Answer Posted / radhika m

Add an extra column 'colA' and 'colB' to the files 'A' and 'B' respectively. Let the value for colsA be 'a' for all the rows in file 'A' and the value for colB be 'b' in file 'B'(using the column generator stage).Now join both the files using join stage using 'ID' column. Perform full outer join. Map the ID col, colA and colB to output. Next pass it through a transformer.

Transformer constraint:

1) file X - colA=a and colB<>b ----->[1,2,3,4,5]
2) file Y - colA=a and colB=b------->[6,7,8,9,10]
3) file Z - colA<>a and colB=b------>[11,12,13,14,15]

Drop cola and colB in the output.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you reject records in a transformer?

635


What are routines in datastage?

780


What are the partitioning techniques available in link partitioner?

1761


What is usage analysis in datastage?

824


Whats difference betweeen operational data stage (ods) and data warehouse?

675






what is repositery?

1303


hi.... am facing typical problem in every interview " I need some critical scenarios faced in real time" plz help me guys

2429


What is datastage engine?

733


What are the some differences between 7.x and 8.x version of datastage?

749


What are the different kinds of views available in a datastage director?

609


What is the flow of loading data into fact & dimensional tables?

601


Field,NVL,INDEX,REPLACE,TRANSLATE,COLESC

975


Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?

634


Define Job control?

681


What are the various kinds of containers available in datastage?

571