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
Field,NVL,INDEX,REPLACE,TRANSLATE,COLESC
What steps should be taken to improve Datastage jobs?
Name the different types of Lookups in Datastage?
Describe stream connector?
for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr
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 do y read Sequential file from job control?
Differentiate between data file and descriptor file?
How a source file is populated?
Can you explain tagbatch restructure operator?
Distinguish between informatica & datastage. Which one would you choose and why?
What are the different common services in datastage?
i have a job with 3 possibiliies finish with ststus ok abbort warning how do you handle these 3 in job sequence? explain the situation where you have appiled scd in your project? chandu
Explain connectivity between datastage with datasources?
Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2