Reject record with NULL from src loads to a mandatory column

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
tsktsk123
Participant
Posts: 32
Joined: Thu Dec 25, 2003 11:59 am

Reject record with NULL from src loads to a mandatory column

Post by tsktsk123 »

Hi,

I like to know if there is a way to drop the record if it comes as NULL from source and we load this record to a column which is defined as mandatory. Currently if the data type is number it loads 0 to that column though it comes as NULL from source.

Appreciate any help on this.

regards,
senthil kumar
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: Reject record with NULL from src loads to a mandatory co

Post by SURA »

Hi

You can try the option like NullToZero(col_name)=0 then Drop the row / what ever you need else xxxx

Hope this might help you.

Cheers
Ram


tsktsk123 wrote:Hi,

I like to know if there is a way to drop the record if it comes as NULL from source and we load this record to a column which is defined as mandatory. Currently if the data type is number it loads 0 to that column though it comes as NULL from source.

Appreciate any help on this.

regards,
senthil kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

WHY does it "come through as zero"? That is, what configuration of your job specifies that null is to be converted to zero? Hint: look very closely at all the column properties of whatever stage type connects to your source.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply