This post is more than 5 years old
37 Posts
0
887
August 17th, 2011 13:00
Join Input Streams When Not 1:1
The help for merge is very specific about how records on the two input streams are used.
join doesn't have the same kind of detail in its help file, and I'm puzzled by something I'm seeing.
I'm using join specifically so records only get through when there's a match between the two streams. Unintentionally, I've created a case when N records on the right stream have the same key. Only one record on the left has a matching key. I'd expect there result to be N records, each having the same fields from the left stream, but distinct parts from the right stream. Instead, I'm getting N-1 records with fields corresonding to the left input stream being null.
First of all, is join working as expected in this case?
Secondly, do DPA releases after 5.71 have more complete documentation for join?
Thanks,
Nick



DavidRussell1
141 Posts
0
August 22nd, 2011 02:00
Hi Nick,
It is my understanding that the Join operator should look at each row on the left hand side and return it *if* it matches a row on the right hand side. If a row on the left hand side matches more then one row on the right hand side I would have expected it only to match on the first one it finds. So in the below example where Server is the key field in both cases:
Left Right
Server Value1 Server Value2
A 12 A 25
B 17 A 37
C 98 A 49
After a join I would expected the following to be in the output:
Server Value1 Value2
A 12 25
Reversing the stream input I would expect the following output:
Server Value2 Value1
A 25 12
A 37 12
A 49 12
Thanks
David
David Russell
EMC Technical Support
dplaflamme1
37 Posts
0
August 18th, 2011 06:00
To follow up: swapping the streams so the stream with the duplicate keys is on the left input gets me past this quirk. I'm still curious about whether it's working as intended, and I still would like the help file to address the issue of how the input streams are used.