Join and Merge results different from Lookup

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
wahi80
Participant
Posts: 214
Joined: Thu Feb 07, 2008 4:37 pm

Join and Merge results different from Lookup

Post by wahi80 »

Hi,

I have two files both containing around 3mn records. I wanted to check out which option would be fastest for joining the data. So I used same set of files in different jobs on Join, Merge and Lookup but am getting different matched records. The Join and Merge show same set of matched records, but lookup shows a totally different number.

On furthere analysis the Lookup output is correct. I'm trying to figure out what is wrong with Join and Merge.

I have already ensured that the keys are hash partitoned and sorted.

What else could I be missing?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

HOW (on what columns) is the partitioning done? What partitioning are you using for the Lookup stage? Have you ensured that inputs to Join and Merge are correctly sorted?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Rakesh311
Participant
Posts: 36
Joined: Wed Aug 04, 2010 10:53 pm
Location: Banglore
Contact:

Post by Rakesh311 »

Join and Merge will also provide you all the matched output ,i.e for the duplicate(multiple) key values if present in ref file also.

Where as in look up it will give you only the first match!!!
rAKESH
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... unless you specify "multiple row return" in the Lookup stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
wahi80
Participant
Posts: 214
Joined: Thu Feb 07, 2008 4:37 pm

Post by wahi80 »

In Lookup the primary link is in Auto Mode, reference link is Entire

In Join and Merge both the links are partitioned and sorted on the join keys.

What else am I missing? I have done this a 100 times before, but this one is bugging me...
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

What type of Join (Inner, Left/Right Outer, Full Outer)? What constraints in the Lookup (Drop, Fail, Continue)? Which had more output records, the Join or the Lookup?

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
wahi80
Participant
Posts: 214
Joined: Thu Feb 07, 2008 4:37 pm

Post by wahi80 »

Join - Inner Join
Lookup - On failure Reject as I ahd to capture the records

Lookup had more matching records
Post Reply