Unmatched Rows in Look up stage

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
ajith
Participant
Posts: 86
Joined: Thu Nov 10, 2005 11:10 pm

Unmatched Rows in Look up stage

Post by ajith »

I want to know how to get only the unmatched rows in a particular look up. Is it possible to do this with look up stage alone.

I was trying to achieve this by specifying the look up condition. But It does not allow me to use reference link columns. I cannot change the link ordering as that is disabled.

I want to avoid using one more stage here, is it possible to do in a look up stage?

Thanks in advance,
Ajith
ThilSe
Participant
Posts: 80
Joined: Thu Jun 09, 2005 7:45 am

Post by ThilSe »

Hi Ajith

One way is to set "When Match not found" to 'Reject' and catch the records in the reject link. But in my opinion, the reject stream should be used only for error or reject records processing.

The "lookup condition" is evaluated 'before' doing the actual lookup which is used to specify whether the lookup has to be performed for that record or not.

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

Post by ray.wurlod »

If what you want to do is identify those rows in the reference Data Set that were not touched by the Lookup stage, without using any more stages, the answer is no.

With more stages, the answer is yes. You need to capture the distinct lookup keys that came from the stream input, downstream of the Lookup stage (Copy and Remove Duplicates stages for example) then perform any kind of difference or outer join between that Data Set and the reference Data Set.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ajith
Participant
Posts: 86
Joined: Thu Nov 10, 2005 11:10 pm

Post by ajith »

Thank you Ray,

I decided to add one more filter stage to sort this out.

Senthil,

As you said, I feel it is improper to use reject link, I dint even check this option out. Thank you too.


Thanks,
Ajith
Post Reply