create column with null value in modify stage

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
royhhlai
Participant
Posts: 7
Joined: Fri Dec 30, 2005 9:07 pm

create column with null value in modify stage

Post by royhhlai »

Dear All,

I would like to see if it is possible to create a null column in Modify stage. Also, in the specification box, when I try to enter "USERID = SetNull" the compiler treated "SetNull" as a input dataset field instead of treating as a build-in function. Can anyone provide the syntax of using SetNull Function in the Specification box?? Thank you so much!!

Best Regards,

royhhlai
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

You cannot create something out of nothing in a Modify stage. It cannot add columns, it can only copy columns or convert columns. Your specification needs to include an existing column name. If you want to generate a new column use the column generator stage or the transformer stage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... or DROP columns
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sanjeev_sithara
Participant
Posts: 15
Joined: Wed May 26, 2004 6:30 am

Post by sanjeev_sithara »

Modify stage has a Handle_Null function the syntax of which goes like this .. Handle_Null(<column_name>,<the value to replace null with>).However this can only be used for existing columns.You cannot create new columns in Modify stage.Use a column generator/transformer for that.
Rgds
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi royhhlai,

I dont think you can create a column with null value but you can use make_null orchestrate function and set null value for any incoming column.

input_column = make_null(output_column, 'XYZ')

HTH
--Rich
Post Reply