Dropped Records in transformer Stage

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
deepticr
Participant
Posts: 32
Joined: Wed Mar 19, 2008 7:01 am
Location: Bangalore, India

Dropped Records in transformer Stage

Post by deepticr »

Hi,

I have a parallel job with a transformer stage which redirectes the input data to three different links based on some constraints.

The input data is as follows:
colA colB
1 100
1 null
5 541
7 null

The constraint on output links are as follows:
link1: colA = 1
link2: colA=1 Or colA=3
link3: otherwise link

The order of links in the link ordering tab is as follows:
link1
link2
link3

Now, in the derivation of link1, I'm performing a calculation as colB+1 and in link2, I mapping the columns from the input without any manipulations to the output. Since I have not performed any null handling in colB, I expect records to be dropped from link1 and records to be processed in link2.

But, here is what is happening:
link1: 0 rows (records getting dropped as null handling is not done) -- This is perfect
link2: 0 rows ??? I don't know why this is happening
link3: 2 rows -- This is expected behavior

Can anyone please tell me why does link2 in this case drop records?!!

-Deepti
robjones
Participant
Posts: 24
Joined: Tue Nov 18, 2008 3:12 pm
Location: London

Post by robjones »

In your output links, is ColB defined as 'Nullable'?
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

Post by gssr »

Validate the Constraint that u mentioned in Link2... :(
RAJ
deepticr
Participant
Posts: 32
Joined: Wed Mar 19, 2008 7:01 am
Location: Bangalore, India

Post by deepticr »

robjones wrote:In your output links, is ColB defined as 'Nullable'?
Yes colB is nullable
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I would never force this type of error - doing an operation on a nullable field. Add IsNull() or similar handling to your job; link1 should have the constraint "ColA=1 AND NOT(IsNull(ColB))", link2 should be "ColA=1 OR ColA=3".
To your issue, what happens when the output of link2 is just ColA and ColB is not used?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you using stage variables? These are currently implicitly not nullable.

News from IOD 2009 is that they're going to be a bit less strict with some of the things in the Transformer stage in a future release, one of those things will be better tolerance of nulls in functions, expressions and stage variables.
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