Page 1 of 1

Stage variables reset to initial value

Posted: Mon Feb 13, 2012 9:15 am
by chetan.c
Hi,

Are stage variables reset to initial value as defined in stage variable property after each row is written out or it holds the value from the processing even after the row is written out?


Thanks.
Chetan

Posted: Mon Feb 13, 2012 9:19 am
by chulett
Initial value? No. They are updated for each row processed through the transformer but they only get their initial value once. Hence the name.

Why do you asK?

Posted: Mon Feb 13, 2012 12:32 pm
by jwiles
Here's a link to the documentation page (for IS 8.5) describing the order of execution of a parallel transformer's logic. For pre-8.5 releases, you can ignore the looping example.


Regards,

Posted: Tue Feb 14, 2012 12:14 am
by chetan.c
chulett wrote:Why do you asK?
Thanks.
So after a row is written out the stage variable is empty or does it hold the earlier value?

Trying to have a better understanding of stage variables so asked. :)

Posted: Tue Feb 14, 2012 12:16 am
by chetan.c
Hi James

Thanks for the link.

Posted: Tue Feb 14, 2012 2:49 am
by ray.wurlod
Stage variables are not cleared between rows. When a stage variable is yet to be evaluated for the current row it contains its value from the previous row (or its initial value if the row being processed is row number 1 on its node).

Posted: Tue Feb 14, 2012 4:31 am
by chetan.c
Thanks ray.

Posted: Tue Feb 14, 2012 8:06 am
by chulett
chetan.c wrote:Trying to have a better understanding of stage variables so asked. :)
No worries, just wanted to make sure there wasn't an actual problem lurking under there. :wink: