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?

Answer Posted / shar

alternative ans lot similar to subu's.
to both files add a dummy column let say
File A
col1,dummy1
1,1
2,1
3,1
4,1
5,1
6,1
7,1
8,1
9,1
10,1
And for File B
col1,dummy2
6,2
7,2
8,2
9,2
10,2
11,2
12,2
13,2
14,2
15,2
Using col generator . Now join the two files using join
stage with full outer join. With key col1.
Then the output will be:
Left_col1, dum1, right_col1, dum2
1 1 0 0
2 1 0 0
3 1 0 0
4 1 0 0
5 1 0 0
6 1 6 2
7 1 7 2
8 1 8 2
9 1 9 2
10 1 10 2
0 0 11 2
0 0 12 2
0 0 13 2
0 0 14 2
0 0 15 2
Now assign the output to Transformer stage where at
constraints we mention:
DSLink6.dummy1 = 1 And DSLink6.dummy2 <> 2
DSLink6.dummy1 = 1 And DSLink6.dummy2 = 2
DSLink6.dummy1 <> 1 And DSLink6.dummy2 = 2
Then at three targets we map
Target 1 : left_col1
Target2 : left_col1
Target3: Right_col1
Hence the o/p.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are routines in datastage?

771


What is the difference between datastage and informatica?

609


Notification Activity

893


what is ds administrator used for?

718


Where the datastage stored his repository?

614






How can you write parallel routines in datastage PX?

614


How do you remove duplicate values in datastage?

619


What is a quality stage in datastage tool?

623


Can you explain kafka connector?

771


what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

953


What are constraints and derivations?

644


sed,awk,head

966


how to read 100 records at a time in source a) hw is it fr metadata Same and b) if metadata is nt same?

1714


In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?

596


Can you explain players in datastage?

701