Page 1 of 1

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

Posted: Fri Mar 18, 2011 4:39 am
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.

Posted: Fri Mar 18, 2011 7:28 am
by battaliou
A nullable column in a sequential file? Give me a break.

Posted: Fri Mar 18, 2011 7:43 am
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,

Posted: Sat Mar 19, 2011 4:28 am
by anandkumar442
Thanks a lot James.. I have handled it in the similar manner. Now its working fine.

Thanks,
Anand.

Posted: Mon Mar 21, 2011 7:24 am
by jwiles
Great! Be sure to to take time to mark this thread as resolved.

Regards,