Grid Iterator🔗
The Grid Iterator component implements a loop over the rows of a grid variable. This runs an attached component multiple times, each time using a different row of values from the grid.
To attach the iterator to another component, use the connection ring beneath the iterator to connect to the input of the other component. The two components will automatically "snap" together, with the iterator component sitting on top of the other component, and can be dragged around the canvas as a single component. For more information about attaching, stacking, and detaching iterators, read Attaching, stacking, and detaching iterators.
If you need to iterate more than one component, put them into a separate orchestration pipeline or transformation pipeline and use a Run Transformation or Run Orchestration component attached to the iterator. In this way, you can run an entire pipeline flow multiple times, once for each row of variable values.
This iterator component is limited to a maximum of 5000 iterations.
Properties🔗
Name = string
A human-readable name for the component.
Grid Variable = drop-down
Choose an existing grid variable to iterate.
Grid Iterator Variable Mapping = columns editor
- Grid Column Name: Enter the grid column name.
- Variable Name: Choose an existing variable.
Break On Failure = boolean
If a failure occurs during any iteration, the failure link is followed. This parameter controls whether it's followed immediately or after all iterations have been attempted.
- No: Attempt to run the attached component for each iteration, regardless of success or failure. This is the default setting.
- Yes: If the attached component doesn't run successfully, fail immediately.
This property is only available when Concurrency is set to Sequential. When set to Concurrent, all iterations will be attempted.
Concurrency = drop-down
- Concurrent: Iterations run concurrently.
- Sequential: Iterations run in sequence, waiting for each to complete before starting the next. This is the default setting.
In Sequential mode, the iterations will always proceed in the same order that the data is held in the grid variable. So the first iteration will use values from the first row of the grid, the second will use the second row of the grid, and so on.
Full SaaS deployments are limited to 20 concurrent tasks, with additional tasks being queued. Hybrid SaaS deployments have 20 concurrent tasks per Maia Foundation runner instance, with a maximum of 100 instances if configured accordingly.
Counting the number of iterations🔗
You can define a pipeline variable to hold the number of rows the iterator will loop through.
- In your orchestration pipeline, create a numeric pipeline variable.
- Use an Update Scalar component to set the variable to
${<grid_variable_name>.<column_name>.length}, where<grid_variable_name>is the name of the grid variable your iterator uses and<column_name>is any column in that grid.
The length property returns the number of items in the column, which equals the number of iterations. Any column can be used, as all columns in a grid variable are the same length.
| Snowflake | Databricks | Amazon Redshift |
|---|---|---|
| ✅ | ✅ | ✅ |