Page 1 of 1

Transformer Null handling and reject link

Posted: Mon Mar 01, 2010 11:13 pm
by TITUS_007
hello,

i have a problem with Transformer, I would like if a column is null that the row is not rejected.

Can you give me a solution, Which stage use before ?

Thanks

Posted: Mon Mar 01, 2010 11:16 pm
by meet_deb85
Why would a row be rejected if the value of a column in NULL. Please elaborate

Posted: Mon Mar 01, 2010 11:20 pm
by TITUS_007
oracle---->Transformer

in my database i have a column with NULL value, all the row are rejected by the transformer why ?

I would like all the row not rejected by the transformer.

Thanks

Posted: Mon Mar 01, 2010 11:23 pm
by chulett
Is a warning or other message being logged? Do you have constraints on the output link? What exactly do you mean by "rejected"? :?

No-one can know the why unless you provide more information on what you are doing or seeing, right now we'd only be guessing.

Posted: Mon Mar 01, 2010 11:24 pm
by ray.wurlod
The field in question must be marked Nullable on the output link.

No Transformer function can be supplied with NULL as an argument (this requirement is relaxed, we are informed, in the next version of DataStage). Therefore any incoming NULL must be intercepted and not passed to the function.
If IsNull(InLink.TheField) Then SetNull() Else TheFunction(InLink.TheField)

Posted: Mon Mar 01, 2010 11:33 pm
by chulett
Ray does tend to be a pretty good guesser, though. :wink:

Posted: Tue Mar 02, 2010 2:02 am
by TITUS_007
the field is marked nullable on the input link and no constraints on output link
and not nullable on output link.

I have a reject link on the transformer.

What is the best stage to transform in a field NULL to # for example ?

Posted: Tue Mar 02, 2010 3:19 am
by ArndW
Since you already have a transform stage in the job then use that stage and a NullToValue() function.

Posted: Thu Mar 04, 2010 11:51 am
by Sreenivasulu
NulltoValue() is a great function of datastage. I found this only lately.
Otherwise i was quite confused on how to handle null data.

Regards
Sreeni