- Range Input:
If
you have connected two inputs to your Iterator,
designate one of them as the range input using this pull-down list.
If you’re using a range input, the operator automatically loops
through each row in the range result set, stopping when there are
no more rows. You must set up other expressions to set the value
of any variables based on the range result set’s columns. However,
you need not maintain your own iteration control variables (such
as a counter that you increment). When you configure a range input,
WorkSpace Data Federation. automatically checks for the end of the result set and terminates
the loop under that condition. You can add an expression in the
Condition field (see below) to cause the looping to terminate while
there are still rows left in the range input, but you cannot cause
the iteration to continue after all rows in the range result set
have been used.
- Initialize
Enter expressions
that set up any variables you need, either to control the iteration
or to be made available to upstream operators. You can enter any
JavaScript code here that would be valid inside a function body.
- Increment
Enter expressions
that update the variables you initialized in the previous field.
If you’re using a variable to control the iteration, increment its
value here. If you’re using any other variables that upstream operators
need to access, update their values here as well. If you’re using
a range input, you can update the variables based on the values
of the columns in the current row of the range input. Here, too,
you can enter any JavaScript code that would be valid inside a function
body.
- Condition
(Optional) Enter a Boolean
expression. While the Boolean expression evaluates to
true, the operator continues to iterate, re-executing its primary
input. When the Boolean expression evaluates to false, the iteration
stops. If you’re using a range input, WorkSpace Data Federation first checks for the
end of the range result set. If its rows aren’t yet exhausted, WorkSpace
evaluates your condition as well, and if your expression evaluates
to false, iteration stops.
- Execute inputs in parallel
Normally,
the Iterator operator waits to
advance to the next iteration until the result set from the previous
iteration has no more rows of data left. If you check this box,
the Iterator
will iterate until
the condition expression evaluates to false,
queuing up the result sets and passing them downstream as they’re requested. If the elements upstream of the Iterator
involve
operations external to the current data service (such as Input Source elements), they are all executed essentially
simultaneously, which generally improves performance.