create a null column 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
mustapha
Participant
Posts: 2
Joined: Fri Jun 24, 2011 4:59 am

create a null column in Modify stage

Post 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
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Re: create a null column in Modify stage

Post by soumya5891 »

Why don't you try this in a transformer stage
Soumya
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mustapha
Participant
Posts: 2
Joined: Fri Jun 24, 2011 4:59 am

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This is not my experience.
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 »

Why not show us what you tried and what error(s) you received?
-craig

"You can never have too many knives" -- Logan Nine Fingers
GaneshLoganathan
Participant
Posts: 27
Joined: Mon Aug 15, 2011 7:32 am
Location: Chennai
Contact:

Post by GaneshLoganathan »

It is possible to create NULL Column in Modify stage.
Rusty Gany
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post 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
- Zulfi
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post 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.
- Zulfi
Post Reply