Page 1 of 1

notnull conversion with non-nullable input

Posted: Mon Jul 26, 2010 5:11 am
by tostay2003
Hi All,

I am getting the following error from the transformer

Code: Select all

When binding input interface field "input0Int8nLDD_X1" to field "X1": Using "notnull" conversion with non-nullable input.
I am using a left outer join and checking the value of a hardcoded field X1 of secondary link. I have used NullToEmpty function while checking the value.

The job runs fine, but gives this warning. Where as, I have used it exactly same way at other place and it doesn't give any such warning.

Posted: Mon Jul 26, 2010 5:24 am
by ArndW
Where are you doing your left join? If in SQL, have you declared the X1 column as nullable in DataStage?

Posted: Mon Jul 26, 2010 6:12 am
by tostay2003
I am doing left outer join using Join Stage. X1 is non-key field from secondary link.

Posted: Mon Jul 26, 2010 6:37 am
by kumar_s
Are you renaming from "input0Int8nLDD_X1" to "X1"?
Is the source field Not Null?

Posted: Mon Jul 26, 2010 7:52 am
by ArndW
Is X1 nullable in your source link?

Re: notnull conversion with non-nullable input

Posted: Mon Jul 26, 2010 2:05 pm
by creatingfusion
Probably you have to apply the function NullToEmpty function only on Null values.... so check if the value is null then apply NullToEmpty

So yours derrivation for the input should be .....

If IsNull(%inputcol%) Then NullToEmpty(%inputcol%) Else ''

Posted: Wed Jul 28, 2010 8:19 pm
by tostay2003
kumar_s wrote:Are you renaming from "input0Int8nLDD_X1" to "X1"?
Is the source field Not Null? ...
Hi Kumar, I am not renaming the field input0Int8n_X1 (it was generated internally within datastage)

ArndW wrote:Is X1 nullable in your source link?
Hi, X1 is nullable in source (secondary link)
creatingfusion wrote:
Probably you have to apply the function NullToEmpty function only on Null values.... so check if the value is null then apply NullToEmpty

So yours derrivation for the input should be .....

If IsNull(%inputcol%) Then NullToEmpty(%inputcol%) Else ''
This field is hardcoded in middle [metadata is nullable through all upstream jobs]. Looks like whenever nullable the field is getting empty string assigned to i. I have checked for the metadata definitions right from the origin, but is nullable everywhere and there is no provision to change the default values of metadata.

Posted: Thu Jul 29, 2010 2:56 am
by ArndW
Turn on $APT_PRINT_SCHEMAS and look at each link's schema to see if what DataStage has defined and what you think is defined are identical.

Posted: Thu Jul 29, 2010 3:17 pm
by ray.wurlod
Turn on $OSH_PRINT_SCHEMAS and look at each link's schema to see if what DataStage has defined and what you think is defined are identical.

Posted: Fri Jul 30, 2010 2:58 am
by ArndW
OK, I get the point :D