No hit on lookup with Ignoring duplicate error

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
ggarze
Premium Member
Premium Member
Posts: 78
Joined: Tue Oct 11, 2005 9:37 am

No hit on lookup with Ignoring duplicate error

Post by ggarze »

This has me really confused and hopefully someone can explain the difference as I'm not sure if it's a parttion issue or something else. I have a Dataset as input with two fields (code, timestamp(key)). I have another Dataset going into a lookup stage with (code(key), start_timestamp, end_timestamp). Now I'm doing a range lookup, if the input timestamp is >= start_timestamp and <= end_timestamp on the lookup dataset then there should be a match. Looking at the data everything should match but of course I get no matches. I guess i should mention the lookup dataset key field, code, is pretty much the same value. Only the timestamp ranges differ. When I run and get no match I get the "Ignoring duplicate entry; no further warnings will be issued for this table" warning message. Thinking it might be a partion issue in the lookup stage I changed the partion to entire for the dataset. Same issue. Only when I go into the lookup stage and change the "Multiple rows returned from link" option from blank to the Link do then all the lookups match and I get output.

Why is this? Is it a partyioning issue? If DS finds a duplicate does it treat it as a not found condition?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, that's simply how it works.
The Lookup stage by default returns one match. If you want more than one (which is likely less of the time) you have to tell it so.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ggarze
Premium Member
Premium Member
Posts: 78
Joined: Tue Oct 11, 2005 9:37 am

Post by ggarze »

So ray, in my example where I have a key which has multiple date ranges and I want to add the start and end date to the incoming records whose date comes in and must be within the range how would I go about this? Because of the dupes would you suggest breaking this out into two separate lookups? For example: first lookup on the code and pass the code from the lookuP(if the code lookup had no match this code being passed on would be null) on to the next lookup which only does the range and use a condition to first check the code from the first lookup. If the code is null then don't do the range lookup if not null then do the range lookup. Does that make sense?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can do it with one, but I believe your two-Lookup solutions is easier to understand and therefore to maintain.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply