INPUT file 'A' contains:
1
2
3
4
5
6
7
8
9
10

input file 'B' contains:
6
7
8
9
10
11
12
13
14
15

Output file 'X' contains:
1
2
3
4
5

Output file 'Y' contains:
6
7
8
9
10

Output file 'Z' contains:
11
12
13
14
15

How can we implement this in a single ds job?

Answers were Sorted based on User's Feedback



INPUT file 'A' contains: 1 2 3 4 5 6 7 8 9 10 input file 'B' contai..

Answer / sarita

Hi Shar,
You aret hardcoding the values in your approach.I think the other approach could be:
1)Take a left outer join on the tables A and B. Common column for join can be a dummy=1.
2)Now output would be 2 columns one will have values 1,2,3,4,5,6,7,8,9,10 other will have NULL....NULL...6,7,...10
in expression transf...take a variable... chk when col a- col b != 0,then put flag X else Y
3)Then similarly do a join for B & C table and use same logic

Hope it works!

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Data Stage Interview Questions

Hi am sundar, i have datas like 00023-1010 00086-1010 00184F2-1010 . . . . SCH-AS-1010 200-0196-039 . . . Now i want the result "SCH-AS" in onee column and "1010" in another column.. Can any one tell the answer...

5 Answers  


What are the partition techniques available in your last project?

1 Answers  


HOW CAN WE SEE THE DATA IN DATASET?

4 Answers  


Hi Friends, I have a input data like, class_id Marks 101 50 101 60 101 40 102 90 102 35 And i want my output data like class_id Marks Rank 101 50 2 101 60 1 101 40 3 102 90 1 102 35 2 how to do this in datastage?

8 Answers   Cognizant, HCL, TIAA CREF,


Is there any possibility to generate alphanumeric surrogate key?

3 Answers   ABC, IBM,






Explain the importance of surrogate key in data warehousing?

0 Answers  


hi i am bhavani, in real time data stage who is the source provide? and how to recevied in developer? Pls send me answer

1 Answers   Polaris,


What is datastage?

0 Answers  


What is RCP?

2 Answers   TCS,


what are the different type of errors in datastage?

2 Answers   Wipro,


What are the areas of application?

0 Answers  


i have a scenario like two columns(Empno, Ename) in that duplicate records are there, so my question is how to get second duplicate record in datastage.

4 Answers   Wipro,


Categories