Page 1 of 1

create a null column in Modify stage

Posted: Fri Jun 24, 2011 5:12 am
by mustapha
Hi every body,

I want to know if it is possible to create a null column in Modify stage.
tanks for help

Best Regards,
Mustapha

Re: create a null column in Modify stage

Posted: Fri Jun 24, 2011 11:20 am
by soumya5891
Why don't you try this in a transformer stage

Posted: Fri Jun 24, 2011 4:03 pm
by ray.wurlod
Yes it is possible to create a null in the Modify stage. The function is make_null() as far as I can recall.

Posted: Sun Jun 26, 2011 1:59 am
by mustapha
After testing and research, I think that impossible to create a null column using Modify stage, you must necessary use the Transformer stage. the function make_null() and hundler_null() don't work in this case.

Posted: Sun Jun 26, 2011 2:52 pm
by ray.wurlod
This is not my experience.

Posted: Sun Jun 26, 2011 4:36 pm
by chulett
Why not show us what you tried and what error(s) you received?

Posted: Sun May 27, 2012 11:51 pm
by GaneshLoganathan
It is possible to create NULL Column in Modify stage.

Posted: Mon May 28, 2012 9:00 am
by zulfi123786
you can create a nullable column in modify stage but you cant set it to null for all records

col1=make_null(col2,1)
would set the column col1 to NULL if col2 happes to be contain 1 else col1 would take col2 value.

col1=handle_null(col2,1)
the above would set col1 to '1' if col2 happens to be NULL else col1 will take col2 value

In either case you cant have col1 generated in the modify stage and set it to NULL for all records unless you already have a column which has same value for all recods and then use make_null function

Posted: Mon May 28, 2012 9:02 am
by zulfi123786
mustapha wrote:After testing and research, I think that impossible to create a null column using Modify stage, you must necessary use the Transformer stage. the function make_null() and hundler_null() don't work in this case.
you dont have to use transformer, a column generator with Nulls percentage=100 would suffice if you wish to generate a new column and fill all NULLS in it.