The Grid Iterator component enables users to loop over values of a simple sequence.
This component implements a simple loop over the rows of a grid variable. It enables you to run an attached component multiple times, each time with different values set on any number of variables. Those variable can be referenced from the attached component.
To attach the iterator to another component, use the blue output connector and link to the desired component. To detach, right-click on the attached component and click Disconnect from Iterator.
If you need to iterate more than one component, put them into a separate orchestration job or transformation job and use a Run Transformation or Run Orchestration component attached to the iterator. In this way, you can run an entire ETL flow multiple times, once for each row of variable values.
In Sequential mode, the iterations will always proceed in the same order that the data is held in the grid variable.
All iterator components are limited to a maximum 5000 iterations.
Name = string
A human-readable name for the component.
Grid Variable = drop-down
Choose an existing grid variable to iterate. If you wish to define a new grid variable, read Grid Variables.
Grid Variable Mapping = columns editor
- Grid Column: Enter the grid column name.
- Variable Name: Choose an existing variable.
Break on Failure = drop-down
- 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 does not run successfully, fail immediately.
If a failure occurs during any iteration, the failure link is followed. This parameter controls whether it is followed immediately or after all iterations have been attempted.
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. This requires all "Variables to Iterate" to be defined as copied variables, so that each iteration gets its own copy of the variable isolated from the same variable being used by other concurrent executions.
- Sequential: Iterations run in sequence, waiting for each to complete before starting the next. This is the default setting.
The maximum concurrency is limited by the number of available threads (2x the number of processors on your cloud instance).
Record Values In Task History = drop-down
Choose whether to record iteration values in the Matillion ETL Task History. The default setting is Yes.
Stop On Condition = drop-down
Select Yes to stop the iteration based on a condition specified in the Condition property. The default setting is No.
For this property to be available, set Concurrency to Sequential.
Mode = drop-down
Select the method of creating the condition.
- Simple: A no-code Condition UI will open, where users must specify an Input Variable, Qualifier, Comparator, and Value using drop-down menus and text fields. This is the default setting.
- Advanced: An editor will open, where users must write the condition manually using SQL.
Condition (Simple mode) = columns editor
- Input Variable: An input variable to form a condition around.
- Is: Compares the input variable to the value using the Comparator.
- Not: Reverses the effect of the comparison, so "Equals" becomes "Not equals", "Less than" becomes "Greater than or equal to", etc.
- Comparator: Select the comparator. Available comparison operators include "Less than", "Less than or equal to", "Equal to", "Greater than or equal to", "Greater than", and "Blank".
- Value: Specify the value to be compared.
Condition (Advanced mode) = text editor
Combine Conditions = drop-down
Use the defined conditions in combination with one another according to either And or Or.
This property is only available when Mode is set to Simple.
This component makes the following values available to export into variables:
|Iteration Attempted||The number of iterations that this component attempts to reach (Max Iterations parameter).|
|Iteration Generated||The number of iterations that have been initiated. Iterators terminate after failure, so this number will be the successful iterations plus any potential failures.|
|Iteration Successful||The number of iterations successfully performed. This is the max iteration number, minus failures and any unattempted iterations (since the component terminates after failure).|
|Snowflake||Delta Lake on Databricks||Amazon Redshift||Google BigQuery||Azure Synapse Analytics|