Field 'Name' from input dataset '0' is NULL. Record dropped.

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
anandkumar442
Participant
Posts: 29
Joined: Tue Feb 16, 2010 8:47 am

Field 'Name' from input dataset '0' is NULL. Record dropped.

Post by anandkumar442 »

Hi All,

I am using sql server 2005 as source to extract the date into the sequential file, in which one of the coulumn is nullable both on the source and the target as well. when I excute the job, I am getting an error:

Field 'ClmnName' from input dataset '0' is NULL. Record dropped.

I tried null handling functions like nulltovalue and nulltoempty and Isnull as well. But still I am getting the same error.

Could you please help out from this issue.

Thanks,
Anand.
battaliou
Participant
Posts: 155
Joined: Mon Feb 24, 2003 7:28 am
Location: London
Contact:

Post by battaliou »

A nullable column in a sequential file? Give me a break.
3NF: Every non-key attribute must provide a fact about the key, the whole key, and nothing but the key. So help me Codd.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

What type of stage is the message coming from? It sounds like a transformer. If so, here are two possible solutions:

1) Copy the column to a stage variable, using the nullhandling logic such as NullToZero(), NullToEmpty(), NullToValue(). Then reference the stage variable in your derivations rather than the input link column

2) You may need to adjust your derivation logic so that nulls are handled separately from other conditions. For instance:

Code: Select all

If (IsNull(colname) or colname = 'A') then 1 else 0
can cause the record to be dropped when colname is Null. All expressions within an If condition are evaluated before then and else. The proper way to write the above logic to handle the nulls would be:

Code: Select all

if IsNull(colname) then '1' else if colname = 'A' then 1 else 0
Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
anandkumar442
Participant
Posts: 29
Joined: Tue Feb 16, 2010 8:47 am

Post by anandkumar442 »

Thanks a lot James.. I have handled it in the similar manner. Now its working fine.

Thanks,
Anand.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Great! Be sure to to take time to mark this thread as resolved.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply