Modify Stage(Defining new column with value assigned to it)

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
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Modify Stage(Defining new column with value assigned to it)

Post by parag.s.27 »

Can we create a new column in modify stage output link with some value assigned to that field.

I want to create a column named 'TARGET_TABLE_NAME' with the value hard-coded as 'POLICY'. Is that feasible?
And for this what function is needed to be mentioned as Specification?

Please give me a suggestion on this regard.

Thanks in Advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Modify stage can create new column but the value must be based on an input column using one of the functions available to this stage type.
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 »

So... use a Transformer?
-craig

"You can never have too many knives" -- Logan Nine Fingers
zapal
Participant
Posts: 6
Joined: Wed Apr 07, 2004 3:36 am

Post by zapal »

The best way is to use the "Column Generator" stage.
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

Post by swades »

zapal wrote:The best way is to use the "Column Generator" stage.
Did you tried :?:
zapal
Participant
Posts: 6
Joined: Wed Apr 07, 2004 3:36 am

Post by zapal »

Yes. I can create a column with a hard-coded value in the Column Generator Stage.
zapal
Participant
Posts: 6
Joined: Wed Apr 07, 2004 3:36 am

Post by zapal »

Yes. I can create a column with a hard-coded value in the Column Generator Stage.
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

chulett wrote:So... use a Transformer?
Actually we were earlier using a transformer, but as a performance improvement task, we are replacing all those transformers those are performing operations that can be handled by another light weight stage. Just to add a column in the incoming stream of data, a transformer usage is too costly.
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please back this kind of assertion with empirical evidence. That is, create both kinds of job and take measurements. You may be surprised.
parag.s.27 wrote:as a performance improvement task, we are replacing all those transformers those are performing operations that can be handled by another light weight stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

ray.wurlod wrote:Please back this kind of assertion with empirical evidence. That is, create both kinds of job and take measurements. You may be surprised.
parag.s.27 wrote:as a performance improvement task, we ...
We can check for number of processes created by each stage used in a particular IIS job on the AIX box. If you check for processes created by Modify stage and Transformer stage on the OS, then you'll find that transformer stage creates more number of processes. It may not mean that its performance will necessarily be less as compared to modify stage. But to get these comparison figures, I have to create the same job using Modify stage, and hence I did ask about how to create a default column with default value in Modify stage. Performance wise if it will be same as transformer, then we'll use the transformer only.
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
Post Reply