Modify Stage handling NULL replacing with another column

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
samarvind
Participant
Posts: 29
Joined: Wed Jan 18, 2006 6:13 am
Location: Sutton, Surrey

Modify Stage handling NULL replacing with another column

Post by samarvind »

Hi,

I am trying to use the Modify Stage to handle Null for one of the column by replacing with value from another input column. Is it possible ?

Specification that I have tried but didn't work looks similar to the one below.

Ex. COL2 = handle_null (COL2,COL1)

Thanks
Arvind
Thanks & Regards
arvind sampath
Software Engineer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'm pretty sure that the second argument to handle_null() must be a constant.

As a more general rule Modify stage functions can only operate on one input field.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
samarvind
Participant
Posts: 29
Joined: Wed Jan 18, 2006 6:13 am
Location: Sutton, Surrey

Post by samarvind »

Thanks Ray, I thought so. Only reason I wanted to see if this functionality can be achieved in Modfiy stage is that I wanted to reduce the usage of transformer wherever possible but given the scenario I might have to use one I think.
Thanks & Regards
arvind sampath
Software Engineer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

samarvind wrote:I wanted to reduce the usage of transformer wherever possible.
Why?
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 »

Transformerphobia is overrated. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply