Reject Records in Join

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
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Reject Records in Join

Post by pravin1581 »

Hi All,

How can we trap the reject records in Join.


Thanks in advance.
sureshabbisetti
Participant
Posts: 21
Joined: Thu Oct 04, 2007 4:34 am
Location: India
Contact:

Post by sureshabbisetti »

Hi Pravin,

Use Merge stage instead of Join stage. The reject link in merge stage gives all the rejected records.
Thanks & Regards
Suresh Kumar Abbisetti
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You requirement is to trap reject records using a JOIN stage? What kind of a join are you doing?
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

Does the requirement ask you to *use* a join stage?

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

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Post 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.
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post 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)
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A Join does not generate any "rejects", either in SQL or in DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Prabhakar
Participant
Posts: 10
Joined: Mon Apr 02, 2007 6:28 pm
Location: Melbourne

Post by Prabhakar »

The merge is only can be used when there is one -to -one relation ship.
jherr22
Premium Member
Premium Member
Posts: 56
Joined: Mon Jan 29, 2007 3:24 pm
Location: Denver
Contact:

Post by jherr22 »

[quote="ray.wurlod"]A Join does not generate any "rejects", either in SQL or in DataStage.[/quote] Ab Initio does though!
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post 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
Post Reply