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
How many areas for files does datastage have?
What is the command line function to import and export the ds jobs?
What are the functionalities of link partitioner?
How can one find bugs in job sequence?
what is repositery?
How to read multiple files using a single datastage job if files have the same metadata?
describe the Steps to confiure a Qlogic switch
what is stage is used for below Input columns: dept|mgr|employee|salary Output columns: mgr|count of employee per mgr|avg salary per dept note: each dept has one mgr and each mgr has many employees
in oracle target stage when we use load option and when we use upsert option?
What are datastage sequences?
Is it possible to query a hash file?
What is oci?
Define APT_CONFIG in Datastage?
what is the use of surogate key in datastage
What is a datastage job?