Best/easiest way to capture reject records in datastage

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

yuva010
Participant
Posts: 36
Joined: Thu Apr 24, 2008 7:12 pm

Best/easiest way to capture reject records in datastage

Post by yuva010 »

Hi,
In our project we want to implment reject handling.
Suppose there are 100 records at source & only 95 records moved to target. How can I capture those 5 records? The reason behind rejection might be anything.
Along with that, can I generate reason message for each record?
Thanks,
Yuva.
jtsoong
Participant
Posts: 29
Joined: Mon Oct 22, 2007 11:52 pm

transformer

Post by jtsoong »

if they are being rejected from a Transformer stage you can click on the 'constraints' button (top left) and set up a reject link
yuva010
Participant
Posts: 36
Joined: Thu Apr 24, 2008 7:12 pm

Post by yuva010 »

Thanks for answering, few more questions -
Does it capture whole source row or only some referrence?
Does it capable of giving the reason of rejection?
Thanks,
Yuva.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Even though you posted in "General" you marked it as a PX question. Reject links in PX come off the output stage and reflect the input data as well as SQL or other errors where applicable.
yuva010
Participant
Posts: 36
Joined: Thu Apr 24, 2008 7:12 pm

Post by yuva010 »

Yeah, from next time onwards I'll post questions in PX.

So does it mean, if I want to implement Error Handling (reject records) at each process (Extract, Transform & Load), it is not possible.
I can handle only during load?
Thanks,
Yuva.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Handling of rejects is possible at any point in time in DataStage. You need to know what type of rejects you are looking for - the first response was assuming you had output to a database or output link which failed, other type of rejects such as bad column values are usually handled within the job itself.
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

jtsoong wrote:if they are being rejected from a Transformer stage you can click on the 'constraints' button (top left) and set up a reject link
The constraints to a particular link will NOT result setting up a Reject Link to a Trasformer Stage.

You might come to say that clicking on the Otherwise/Log in the Constraint of the particular Link and keeping that link at last in the Link Order could catch the (rejected) records which failed to meet constraints on all the previous output links.

For your information:

The conversion of Stream Output Link to Reject Link in a Transformer Stage will happen only when applying "Convert to Reject" action on the Stream Output Link.

Author(yuva010),

Give some extra care when using Otherwise/Log option in the Transformer Stage. Better refer Parallel Job Defveloper's Guide page# 449.
Last edited by ag_ram on Sat May 31, 2008 5:50 am, edited 1 time in total.
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

yuva010 wrote:Thanks for answering, few more questions -
Does it capture whole source row or only some referrence?
Does it capable of giving the reason of rejection?
1. Reject from only Source(if it is in Transformer Stage)

2. No. Reason for rejection should be user-described.
yuva010
Participant
Posts: 36
Joined: Thu Apr 24, 2008 7:12 pm

Post by yuva010 »

In 'Px', except transformer stage which are the
other stages where we can use reject link?
Merge, Lookup etc..?
Thanks,
Yuva.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Many parallel stage types support a reject link. The descriptions of each in the manuals will tell you which they are.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tsn
Participant
Posts: 51
Joined: Wed Jan 10, 2007 1:32 am

Post by tsn »

1. what type os rejection it is?

is that due to the data comes in source

or

while performing the validation rule in your requirement.

If data you are getting in the source not matches with the job developed those general warnings and errors you can get it in the reject link.

whereas if your requirement expects '1' and 'A' is coming in that if you want to reject the record then you need pull out those records and store it.

you should store the rejected, it won't come automatically
with regards,
tsn
yuva010
Participant
Posts: 36
Joined: Thu Apr 24, 2008 7:12 pm

Post by yuva010 »

Ohhh Yeah.... Thats' true...
But I am expecting such a rejection will also get captured automatically as long as I have mentioned correct data types for target.
Thanks,
Yuva.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not at all. AGE might be an integer, but - for a person - you'd expect to reject negative values and "too large" values (over 120, say).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tsn
Participant
Posts: 51
Joined: Wed Jan 10, 2007 1:32 am

Post by tsn »

It is based on your requirement. can you narrate what is your requirement. so that it wil be useful for the boarders to write the correct answers / solutions to your queries.
with regards,
tsn
tsn
Participant
Posts: 51
Joined: Wed Jan 10, 2007 1:32 am

Post by tsn »

It is based on your requirement. can you narrate what is your requirement. so that it wil be useful for the boarders to write the correct answers / solutions to your queries.
with regards,
tsn
Post Reply