Help with Logic on Rejecting Records.

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
Kel
Participant
Posts: 31
Joined: Mon May 11, 2015 3:20 am
Location: Robinsons Cybergate Tower 2
Contact:

Help with Logic on Rejecting Records.

Post by Kel »

Hi Everyone,

I have a stream of data that looks like this

col1|col2|col3|col4|col5
Null|Inconsistent|Valid|Valid|Valid
Valid|Valid|Valid|Valid|Valid
Null|Valid|Valid|Valid|Valid
Valid|Inconsistent|Valid|Valid|Valid

Now our problem is on the transformer stage we do a constraint which when Column is null or inconsistent it goes to a shared container. On the shared container stage, there is a certain column, whose value is the Column name of the record that is null or inconsistent. We have a problem on row 1, because it is both null and inconsistent. With our present constraint, it will just generate one row at the shared container. And we need two rows to be generated , one for null on col1, and other for inconsistent on col2.

I like to ask how can on what logic do I need to get the desired output.

Thanks.
BOG
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You need a Transformer with a loop to traverse the columns to detect any invalid or null, and to transfer the row to the output link (possibly with diagnostics) when either is found.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Kel
Participant
Posts: 31
Joined: Mon May 11, 2015 3:20 am
Location: Robinsons Cybergate Tower 2
Contact:

Post by Kel »

Hi ray,

Is there an option on looping on transformer stage available. We are currently using Datastage 8.1

Thanks.
BOG
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Without the loop, could you not set up individual output links for each column and constraints to control them? Then a Funnel to put them back together.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

And, from memory, you don't get Transformer looping till version 8.5.
Seriously, version 8.1 is really old now. It's out of support. Any reason you can't upgrade?
Last edited by ray.wurlod on Tue Jul 21, 2015 3:28 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

+1

:wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply