Usage of Stage Variables

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
Aquilis
Participant
Posts: 204
Joined: Thu Apr 05, 2007 4:54 am
Location: Bangalore
Contact:

Usage of Stage Variables

Post by Aquilis »

Hi all,

In one of my code,i need to perform Number of validations.Henceforth i am going with usage Number of stage variables.So what would be the Maximum number of stage Variables ideally one can have, in a code.My StageVariables involve IsNull() function also for many times.Will Nullability check in Stage Varibales hamper performance to any extent ?

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

Post by ray.wurlod »

There is no limit on the number of stage variables that you can use.

What do you mean by "performance"? If you have to check null you have to incur that cost, whether in a stage variable or somewhere else.

The overheads of using a stage variable are nil, since to do it anywhere else (for example in an expression) involves an intenal variable to capture the result. You can see this in the compiled code. The only difference with a stage variable is that you get to choose the variable name.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

In general, All the validation will cost the resource, whether you do in the stage variable or in the column derivation in the trransformer. There is no rule which decides the max no of stage varible can be present in the transformer. Moreover the coding can be simplified using the stage variable if same derivation is used in mutiple column derivation.
Post Reply