Page 1 of 1

Reject Files-no null export handling

Posted: Wed Mar 07, 2007 6:25 am
by dsisbank
I have oracle target and a column which has nullable Timestamp data type named A.Before target,i use transformer stage and set A column like above,
If A>currenttimestamp() then SetNull() else A
After jop finished,Some records exported rejects file.But export was unsuccessful .No data was written seq file.
Warning messages
Sequential_File_204,0: Field "A" is null but no null export handling is defined [impexp/group_comp.C:8579]
How can i solve this?Because i have to see data rejected.

Posted: Wed Mar 07, 2007 6:54 am
by trobinson
What is everybody on vacation today? Where's Kumar?

Go to the Input tab of the Sequential file stage you are writing to.
Go to format tab.
Select Field Defaults folder.
Select the Null Field Value Property and assign it a value of "" (double quote double quote). In other words a field value of empty.

A NULL in a Sequential file must be represented by something. That something most often can be a value of "empty" although you can make it whatever you want.

The result of doing this is that whenever DS detects a NULL in the data, it will replace it with "" when writing to the file.

I would also note that your IF is probably causing the reject since IF A>... is NOT possible if A is NULL. You can't compare a NULL to anything. Therefore if you wanted to be more explicit and also eliminate the warning you could write IF ISNULL(A) THEN "" ELSE IF A > current_timestamp then "" Else A

and achieve the same result as the more general NULL handling via the field value property.

Posted: Wed Mar 07, 2007 7:03 am
by kumar_s
Or rather than setting null in transformer, assign some default value like 0000-00-00 00:00:00 (If it accepts without any error) and assing the same value in NullableFieldValue option Properties tab mentioned by robinson. Which will assign Null to that field value.

Yeah... even I tough of the same.. today all went to enjoy vacation. Its already my Bed time. :cry:

Posted: Wed Mar 07, 2007 7:05 am
by kumar_s
Ah... atlast I could see Kim online. :twisted:

Posted: Wed Mar 07, 2007 9:04 am
by DSguru2B
trobinson wrote:What is everybody on vacation today? Where's Kumar?
We wish. No vacation. Yea, Kumar, where were you !!!
Just playing with you :P