Setting Iterator Properties

When you define an Iterator operator, you must specify the schema of the output result set. You can also edit its general properties, including its name and description.

  1. Double-click an Iterator operator. The Iterator Properties dialog appears.


  2. (Optional) Edit the Name and Description for this Iterator.
  3. In the remaining fields, define the iteration as follows:
    • 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.

  4. Click OK to save your changes and close the dialog.
Related concepts
Expressions Menu
Boolean Expressions
Related reference
Properties Dialog Field Descriptions

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.