Transformer Null handling and reject link

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
TITUS_007
Participant
Posts: 4
Joined: Mon Feb 23, 2009 9:18 am

Transformer Null handling and reject link

Post 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
meet_deb85
Premium Member
Premium Member
Posts: 132
Joined: Tue Sep 04, 2007 11:38 am
Location: NOIDA

Post by meet_deb85 »

Why would a row be rejected if the value of a column in NULL. Please elaborate
TITUS_007
Participant
Posts: 4
Joined: Mon Feb 23, 2009 9:18 am

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ray does tend to be a pretty good guesser, though. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
TITUS_007
Participant
Posts: 4
Joined: Mon Feb 23, 2009 9:18 am

Post 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 ?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Since you already have a transform stage in the job then use that stage and a NullToValue() function.
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post 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
Post Reply