Page 1 of 1

How to handle reject in Join

Posted: Wed Nov 25, 2009 10:53 pm
by srai
Hi,

I have join two tables based on id columns using JOIN stage.

There are some reject means after joining two table some records are not satisfying the joining criteria . I would like to capture those records.
Any tips how to handle the rejects after joining?

Posted: Wed Nov 25, 2009 11:11 pm
by tehavele
Use Transformer stage after join stage. Capture reject rows using Null handling function IsNull.

Posted: Wed Nov 25, 2009 11:20 pm
by satish.raghavan
Data's rejected in join stage cannot pass through the transformer after the join stage for the records which have been rejected initially.
If you are comparing two tables then you can use the Lookup stage for capturing the rejected records else try to capture the NULL records using the transformer before the join stage.

Posted: Thu Nov 26, 2009 12:38 am
by syeed
if you are dealing with huge amount of data then use Merge Stage to capture the unmatching records.

Thanks,
Waseem.

Posted: Thu Nov 26, 2009 2:01 am
by ray.wurlod
There's no such thing as rejects from a join - there's only the result of the join. It's the same in DataStage as it is in SQL.

Posted: Thu Nov 26, 2009 2:27 pm
by Kryt0n
What you are looking for is an outer join... left/right/full depending on which side you are interested in finding these "rejects", then in subsequent stage identify those where left/right data is missing

or alternatively use the lookup with a fail condition to a new link