Iterator operators

An iterator operator causes an operator or a series of operators in a control flow to be repeated until certain conditions are met. In other words, the iterator defines a processing loop.

Conceptual diagram of iterator

Most operators in a control flow are run only once. In some cases, you might want to define a processing loop. A processing loop or iteration revolves around variables that you define.

After placing an iterator operator in the canvas, you can select it to view and define its properties. You must specify the variable to use and the type of iteration that you want performed.

The iterator operator uses a set of values defined at run time in the iterator operator. When control passes to the iterator operator inside a control flow, the runtime engine determines the set of values that the iteration uses when it runs. While the iteration is in progress, if you change the value of a variable, directory, or file, then the iterator operator ignores these changes until the current iteration is complete. The operator continues the iteration using only the values that the runtime engine defined when the iterator started. The changes that you make in the middle of the iteration take effect when you run the control flow again. For example, suppose you have a directory that has three files (a, b, and c) and you define the iterator operator to run on the files in the directory. If a fourth file “d” is added in the middle of the iteration, then the iteration only runs using the original three files in the directory: a, b , and c.

Iteration type

You can specify the following types of iteration:
  • Repeat loop for each delimited data item in a file
  • Repeat loop for each file in a directory
  • Repeat loop a fixed number of times

Iteration branch

A iteration branch is simply a sequence of operators. An iteration or processing loop usually consists of two branches:
Primary branch
This sequence of operators is supposed to run when every operator runs successfully.
Figure 1. Primary branch in an iterator operator
Primary branch of processing loop consists of running Data Flow_31 when Data Flow_37 completes successfully.
Error branch
This sequence of operators is the one that you want run when there is an error in the primary sequence.
Figure 2. Error branch in an iterator operator
Error branch of processing loop consists of sending an e-mail when Data Flow_37 fails to complete.


Feedback | Information roadmap