Page 1 of 1

Null Substitution in Joins

Posted: Thu Jan 10, 2008 11:03 am
by amit_dwh
Hi

I am encountering a strange thing while performing join in Datastage.

When i perform a left/right join on on two datasets in DS then it substitutes Null for non matching records but when i perform a join between a dataset and teradata enterprise stage then it substitutes :
1) Blanks for character values
2) Zeroes for integral values

for non-matching Teradata Enterprise data but NULLs for dataset non matching values.

So is it that NULLS are not substituted in DS after joins for non matching Teradata records?

Posted: Thu Jan 10, 2008 4:02 pm
by ray.wurlod
This looks like default value substitution. First, though, can you be certain that the substitution is occurring after the Join stage, not before? If so, can you check these fields' extended properties to determine whether a Default is specified for the particular data types?

A "default default" such as you have described can also occur when NULL is generated in a stage but the target field is defined to be not nullable.

Posted: Mon Jan 14, 2008 4:50 pm
by amit_dwh
i checked it and DS substitutes NULLs after joins only for datasets and not for databases.