Specifying loops

You can specify that the Transformer stage outputs multiple output rows for every input row by defining a loop condition.

You can specify that the Transformer stage repeats a loop multiple times for each input row that it reads. The stage can generate multiple output rows corresponding to a single input row while a particular condition is true.

You can use stage variables in the specification of this condition. Stage variables are evaluated once after each input row is read, and therefore hold the same value while the loop is executed.

You can also specify loop variables. Loop variables are evaluated each time that the loop condition is evaluated as true. Loop variables can change for each iteration of the loop, and for each output row that is generated.

The name of a variable must be unique across both stage variables and loop variables.

  1. Define any required stage variables.
  2. Define a loop condition.
  3. Define any required loop variables.
  4. Define any output column derivations