Page 1 of 1

Usage of Stage Variables

Posted: Tue Apr 08, 2008 3:27 am
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,

Posted: Tue Apr 08, 2008 4:30 am
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.

Posted: Tue Apr 08, 2008 4:49 am
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.