Capture Only Not matching rows

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
yugee
Participant
Posts: 34
Joined: Fri Feb 04, 2011 5:54 pm

Capture Only Not matching rows

Post by yugee »

Hi,

I have an input with a key and another table with error records. I have to match my input with the table and get only the non matching records. Currently I have a lookup, output and reject. But, since I don't want any matched records for further processing, I want to avoid writing these matched recors into a file. Is there any way I can capture only the Non Matching records from look up?

Input 1: File
Lookup: Table
Output: Only non matched records

Thanks in advance,
Yugee.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure. Set the Lookup's "Failed lookup" rule to Continue and allow only null key columns downstream from there.
-craig

"You can never have too many knives" -- Logan Nine Fingers
yugee
Participant
Posts: 34
Joined: Fri Feb 04, 2011 5:54 pm

Post by yugee »

Thanks Craig..But in my case there are 90% records matching and only 10% of them are not matching (average volume in the input is around 100K). I can have a filter stage to get only the null value records, but in this case I will be checked the null value for an extrat 90% of the records. This job is critical and any time/processing saved would be critical.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

They have to be checked one way or another so it's not like wasted processing time. Alternately, you could load the file into your database and use SQL to get the non-matches but regardless 100% of the data needs to be checked.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a Reject link on the Lookup stage to capture the failed lookups.

Direct the regular output link to a sink of some kind, such as a Copy stage with no output link.
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