Capturing rejects with Valid description

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
lna_dsuser
Premium Member
Premium Member
Posts: 29
Joined: Tue Aug 14, 2012 1:06 pm

Capturing rejects with Valid description

Post by lna_dsuser »

Hi All,

I have a requirement to capture the rejected records with their severity in a rejected table.

Job design SQ-->TX---->OC
Sequential file with 7 cols
A,B,C,D,E,F,G

In transformer i have to check whther all the col from A to G are valid or not and populate the reject table with proper reason.

for a given row suppose col A,ColB And colc are invalid then reject table should have 3 rows with description of y that got rejected?

Request ur Help
sendmkpk
Premium Member
Premium Member
Posts: 97
Joined: Mon Apr 02, 2007 2:47 am

Post by sendmkpk »

well you can do this by creating 7 extra columns in the transformer, one for each column, deriving/calculating if it is a passed or rejected one, along with its cause/reason

and then later do a pivot, ie only for these 7 extra columns, translating one row into 7 rows and then filter out good/passed ones and let thru only the rejected ones with thier reason.

and then load these into ur reject table.
Praveen
lna_dsuser
Premium Member
Premium Member
Posts: 29
Joined: Tue Aug 14, 2012 1:06 pm

Post by lna_dsuser »

Ya That is fine what if i have 200 col. if there a different way to do this
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

What is your definition of valid/invalid? On what basis will you be rejecting rows? Did you think of maintaining an error framework that would have tables providing descriptions of errors/rejects and the like?
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
lna_dsuser
Premium Member
Premium Member
Posts: 29
Joined: Tue Aug 14, 2012 1:06 pm

Post by lna_dsuser »

We are just performing Data type validations, Null validations n all using Isvalid function for individual coln.

we have defined a table which will have the reject desciption, Reject data and severity of that reject
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

You can validate each column in stage variables and if you need details on each column if erroneous then you can append it in same description one by one.

If you need to reject the records on first error only. Don't append.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Imagine you don't have DataStage. Then, to check 200 columns, you have to do 200 checks, yes? Why do you think DataStage could do it any differently, particularly of the check rule is different for each of the columns?
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