Page 1 of 1

Reject Records in Join

Posted: Wed Apr 30, 2008 9:08 am
by pravin1581
Hi All,

How can we trap the reject records in Join.


Thanks in advance.

Posted: Wed Apr 30, 2008 10:48 am
by sureshabbisetti
Hi Pravin,

Use Merge stage instead of Join stage. The reject link in merge stage gives all the rejected records.

Posted: Wed Apr 30, 2008 12:22 pm
by pravin1581
sureshabbisetti wrote:Hi Pravin,

Use Merge stage instead of Join stage. The reject link in merge stage gives all the rejected records.
But the requirement is to use the Join stage,as it gives the join types which we donot get in merge.

Posted: Wed Apr 30, 2008 12:25 pm
by ArndW
You requirement is to trap reject records using a JOIN stage? What kind of a join are you doing?

Posted: Wed Apr 30, 2008 12:28 pm
by Minhajuddin
Does the requirement ask you to *use* a join stage?

State your requirement clearly, that would help others help you :D

Posted: Wed Apr 30, 2008 1:32 pm
by pravin1581
Minhajuddin wrote:Does the requirement ask you to *use* a join stage?

State your requirement clearly, that would help others help you :D
Yes thats right.

Posted: Wed Apr 30, 2008 1:36 pm
by Minhajuddin
Do you want records which don't have a match in the join in the rejected records?

If so, you can use a left outer join(by properly ordering the links) and in a downstream transformer you can check if a not nullable column(you should pass a not nullable column to the output from the right link in the join, also you should change the nullable property to YES) from the right link. If the not nullable column is null you can send it to a file (this would be your reject link)

Posted: Wed Apr 30, 2008 2:43 pm
by venkatvelpula
Minhajuddin wrote:Do you want records which don't have a match in the join in the rejected records?

If so, you can use a left outer join(by properly ordering the links) and in a downstream transformer you can check if a not nullable column(you should pass a not nullable column to the output from the right link in the join, also you should change the nullable property to YES) from the right link. If the not nullable column is null you can send it to a file (this would be your reject link)
Try to use full outer and find the key column which is null on the reference to filter out after the join

Posted: Wed Apr 30, 2008 3:04 pm
by ray.wurlod
A Join does not generate any "rejects", either in SQL or in DataStage.

Posted: Wed Apr 30, 2008 11:09 pm
by Prabhakar
The merge is only can be used when there is one -to -one relation ship.

Posted: Tue Jul 29, 2008 1:26 pm
by jherr22
[quote="ray.wurlod"]A Join does not generate any "rejects", either in SQL or in DataStage.[/quote] Ab Initio does though!

Posted: Tue Jul 29, 2008 4:42 pm
by keshav0307
strange requirement. without knowing the tools limitation.

if your requirement is to capture the records which does not fulfill the join criteria, then use full outer join in then in a filter or transformer stage, check the null values from the child link