Page 1 of 1

Capturing rejects with Valid description

Posted: Thu May 16, 2013 4:27 am
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

Posted: Thu May 16, 2013 4:47 am
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.

Posted: Thu May 16, 2013 5:20 am
by lna_dsuser
Ya That is fine what if i have 200 col. if there a different way to do this

Posted: Thu May 16, 2013 5:47 am
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?

Posted: Thu May 16, 2013 6:25 am
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

Posted: Thu May 16, 2013 1:25 pm
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.

Posted: Thu May 16, 2013 2:05 pm
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?