Page 1 of 1

Looping in Transformer stage

Posted: Wed Dec 05, 2012 6:07 am
by pillip
Hi,

I would like to generate multiple rows from a single row and each row is dependent on the previous row. I have implemented this using stage variables by storing the values of prev and curr record. For looping I have used a constraint which increments the count and checks for the required count.
But I find that this constraint doesnt loop back to the stage variables for implementing the looping. It executes only for the current record.
Can you let me know how to loop back to the stage variables for calculating the next recrod.
I am using 8.1 version which does not have the in built looping option.

Posted: Wed Dec 05, 2012 6:32 am
by bhasds
Hi pillip,

Could you please post some sample input records and the desired output.

Re: Looping in Transformer stage

Posted: Wed Dec 05, 2012 7:43 am
by chulett
pillip wrote:For looping I have used a constraint which increments the count and checks for the required count.
This is confusing as constraints can't increment anything, all they do is evaluate an expression for true/false and if true allow a record to pass through. And you can't do any "looping" in the transformer until you upgrade to a version that supports it.

As noted, details would help. Show us some sample input records and what the corresponding output records need to look like. Then detail what you've done so far with the stage variables.