Page 1 of 1

DS job logic needed

Posted: Wed May 18, 2011 9:17 am
by boopathy86
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 do in this in a single ds job in px ?....could you please give me the logic to implement ???

Posted: Wed May 18, 2011 9:35 am
by pandeesh
hi,

Could you elaborate a little bit?

On what basis you are sending to output files?

Would be equal no of lines in all the 3 output files?

The contents of the i/p file will be always in sequence?

The input files are always same with the same content?Not a dynamic one?

Posted: Wed May 18, 2011 10:17 am
by DSguru2B
You are looking for a full outer join between the two. Look at this topic
viewtopic.php?t=124978&highlight=full+o ... join+stage

Posted: Wed May 18, 2011 12:44 pm
by soumya5891
What is the logic?
Do you want to populate each file with five consecutive values?

Posted: Wed May 18, 2011 3:28 pm
by hsahay
You need three joins for three files

One is left outer , one is right outer and one is equijoin...

Re: DS job logic needed

Posted: Wed May 18, 2011 11:07 pm
by boopathy86
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

i need to populate three output files x,y,z.

output x should contatin the data which is present in the input file A and not present in input file B.

output y should contatin the data which is present in the input file A and input file B.

output z should contatin the data which is present in the input file B and not present in input file A.


I've given the input file records as sample only...not a series of numbers...


How can we do in this in a single ds job in px ?....could you please give me the logic to implement ???

Posted: Wed May 18, 2011 11:16 pm
by ray.wurlod
Full outer join.

Three-output Filter or Transformer stage constraining on whether A is null or B is null or neither is null.

Posted: Thu May 19, 2011 3:50 am
by peddakkagari
Yes, Full outer join will solve your problem
I agree with ray's reply

Posted: Sat May 21, 2011 1:12 am
by pandeesh
Can anybody post the job design for this?

Today i had the same question in interview.

Thanks

Posted: Tue May 24, 2011 4:20 am
by boopathy86
Hi ray...thanks...logic works fine...