Null handling in transformer

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

Swaruparani
Participant
Posts: 5
Joined: Wed Sep 12, 2007 1:54 am
Location: Bangalore

Post by Swaruparani »

Hi Shalini,

pls try this one in transformer,this is working

If IsNull(DSLink3.inputcolumn) Then 'UNKNOWN' Else If trim(nulltoempty(DSLink3.inputcolumn)) ='' Then 'UNKNOWN' Else DSLink3.inputcolumn
Swarupa
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What is the datatype for the column?

What if you set the null value as 'Unknown' ?
samsuf2002
Premium Member
Premium Member
Posts: 397
Joined: Wed Apr 12, 2006 2:28 pm
Location: Tennesse

Post by samsuf2002 »

Are you able to view those records when you click "view data" in sequential file. What is the job design ?
hi sam here
Swaruparani
Participant
Posts: 5
Joined: Wed Sep 12, 2007 1:54 am
Location: Bangalore

Post by Swaruparani »

Hi Shalini,

This one is working,u can try this:

If IsNull(DSLink3.inputcolumnn) Then 'UNKNOWN' Else If trim(nulltoempty(DSLink3.inputcolumnn)) ='' Then 'UNKNOWN' Else DSLink3.inputcolumnn


Thanks.
Swarupa
dspxlearn
Premium Member
Premium Member
Posts: 291
Joined: Sat Sep 10, 2005 1:26 am

Post by dspxlearn »

By viewing the data from the sequential file are you seeing a single space or multiple spaces or nothing for that paticular record?
Thanks and Regards!!
dspxlearn
Post Reply