Page 1 of 1

create column with null value in modify stage

Posted: Thu Jan 05, 2006 9:57 am
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

Posted: Thu Jan 05, 2006 7:37 pm
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.

Posted: Thu Jan 05, 2006 8:13 pm
by ray.wurlod
... or DROP columns

Posted: Thu Jan 05, 2006 10:32 pm
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

Posted: Fri Jan 06, 2006 2:20 am
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