Skip to content

Attaching, stacking, and detaching iterators

Use iterators to "loop" components, i.e., repeat the component without adding multiple copies of the same component to your pipeline. You can stack multiple iterators of the same type or different types on a component.


Attaching iterators

There are two ways to attach an iterator to a component:

  • Click the component and then click Iterate in the component action bar. Next, select the iterator you want to use. It will automatically be attached to the selected component on the canvas.
  • Click and drag an iterator to the canvas from the Components tab, and then use the connection ring beneath the iterator to connect it to the input of the component you want to iterate.

Stacking iterators

To stack iterators on a component, simply use the connection ring beneath each iterator to connect it to the input of the component you want to iterate. As you repeat this process for each iterator, they will stack on top of the component.

When you stack iterators, the iterators are nested, from top to bottom. This means that the top iterator runs one step of its loop, followed by the second iterator, and so on. Once the bottom iterator has finished its first full loop, the top iterator runs its second step.

For example, if you have the following stack of iterators on a Print Variables component, they are processed as follows:

  • Sequential File Iterator (3 files)
  • Concurrent Loop Iterator (values 1 to 10)
  • Print Variables component

  • The File Iterator runs its first step (file 1), the Loop Iterator runs all steps (values 1 to 10), and the Print Variables component prints ten times (file 1 value 1, file 1 value 2, file 1 value 3, etc.).

  • The File Iterator runs its second step (file 2), the Loop Iterator runs all steps (values 1 to 10), and the Print Variables component prints ten times (file 2 value 1, file 2 value 2, file 2 value 3, etc.).
  • The File Iterator runs its third step (file 3), followed by the Loop Iterator and Print Variables component in the same way as for the first two steps.

Detaching iterators

Detach all stacked iterators from a component to reorder them or remove individual iterators. All iterators that were stacked on this component will be detached and shown in a horizontal row above the component. To detach iterators from a component, follow these steps:

  1. Open the pipeline containing the component with stacked iterators.
  2. Click the component or iterators you want to detach.
  3. In the component action bar, click Detach.