nullable fields in lookup

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
lory
Participant
Posts: 21
Joined: Tue Apr 13, 2004 9:05 am

nullable fields in lookup

Post by lory »

Hi,
In the lookup stage I have 4 options if the lookup is not found. The options are 1. Continue 2. Abort 3. Reject and 4. Drop.
If I use the first option and say to continue a null will be passed to the output....
The null values dipend on the column lookup format?
Because If the lookup column are not nullable and lookup not match I have an error in my job,
Why??
Thanks in advance
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Lory,

if the column is not nullable and the lookup is not successful the default value will be returned for each column. I am not at a terminal right now, but for char that is, I think, a project default of char(000) and varchar would come back with a length of 0
lory
Participant
Posts: 21
Joined: Tue Apr 13, 2004 9:05 am

Post by lory »

Thanks for reply.
And for number?
If the lookup field is nullable what does it happen?

Thanks! :)
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It returns a 0.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If the lookup field is nullable AND the output field is nullable (and the rule is "Continue"), then you will get null. You will need to handle this null further downstream in your job.
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