Logic to reject

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
kashif007
Premium Member
Premium Member
Posts: 216
Joined: Wed Jun 07, 2006 5:48 pm
Location: teaneck

Logic to reject

Post by kashif007 »

I am trying to implement a logic but I am not sure How do I apply it.

I am reading say 5 columns, if a condition(On Constraint transformer) does not match then I want to reject all rows associated to that one column. But other Rows should show up.

Ok let me try ot explain again. Suppose I have five columns as follows:
sno,name,property,value,area. If I have 5 rows associated to one "property" and one of the row has not satisfied condition say "Value" not numeric then I want to reject all five rows to reject link. Although 4 have satisfied the condition. I am using transformer stage to do so.

Can anyone suggest what do i do to get this business rule working.
Regards
Kashif Khan
Andet
Charter Member
Charter Member
Posts: 63
Joined: Mon Nov 01, 2004 9:40 am
Location: Clayton, MO

Post by Andet »

You might have to resort to writing the file out to a temporary space and then reading it back in, keeping the grouping information that you desire.
We've done some of this using external routines, so DataStage doesn't even see the writing and reading.
The problem, as I see it, doing this in DataStage alone, is that some of the records that you want to reject have already been passed; so you have to save all of the sorted input records into groups, where the decision on whether or not to reject is not done until the last record in the group is read.
The only way to do this is to save all the records in the group-for a single pass methodology.
If you have two reads into the same feed, then you can pass along the second feed once the first feed has made the keep or reject decision.

Hope this helps some....
Ande

"So, you think this will work?"
Post Reply