Transfomer dropping row

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
Rajav123
Participant
Posts: 5
Joined: Wed Oct 05, 2011 9:47 am

Transfomer dropping row

Post by Rajav123 »

Transfomer is dropping a record when the field has null.

DB --> Xfm-->Lookup-->xfm2..>file

Source has 15 rows. One of the columns in source doesn't have lookup value in lookup table. so it is passed out of Lookup stage.(15 rows) with NULL value. When data passing out of xfm2, only 14 rows are passed out. I tried with putting all columns Nullable to 'YES'. But still I am not able to get through all 15 rows. The row with NULL value is getting dropped out after xfm2. In xfm2, I put
if IsNull(lnk_order.ID) then '' else lnk_order.ID
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is the "Lookup failed" rule in your Lookup stage "Drop"?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prakashdasika
Premium Member
Premium Member
Posts: 72
Joined: Mon Jul 06, 2009 9:34 pm
Location: Sydney

Post by prakashdasika »

Are you using any stage variable that has the column mentioned. Stage variables cannot handle null. I would say use NullToEmpty or NullToValue functions for handling nulls.
Prakash Dasika
ETL Consultant
Sydney
Australia
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

In addition, not only within a stage variable derivation but if you reference the column in the derivation of another output column. If you do anything with a nullable column other than simply copy it to an output link you need to include null handling logic.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
fmou
Participant
Posts: 124
Joined: Sat May 28, 2011 9:48 pm

Post by fmou »

Rajav,

Please mark the topic as resolve if it is.

I believe all cases have been covered in above replies.
Post Reply