Reject Files-no null export handling

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
dsisbank
Premium Member
Premium Member
Posts: 50
Joined: Fri Aug 11, 2006 4:53 am

Reject Files-no null export handling

Post 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.
trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post 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.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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:
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Ah... atlast I could see Kim online. :twisted:
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply