Skip to main content
The Table Iterator orchestration component lets you loop over rows of data within a table or view and run another component for each row. This component implements a simple loop over rows of data in an existing table. It enables you to run an attached component multiple times, each time with different values set on any number of variables taken from columns of that table. Those variables can then be referenced from the attached component. 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. The iterations are set up in advance, so the connection to the input table can be closed before any iterations are performed. If the attached component modifies the iteration table, those changes will not be reflected during the current run. Furthermore, to control runaway processes and manage resources, only a limited number of rows of a table are considered for iteration. If you are iterating many rows, it is instead recommended that you use the table in a transformation pipeline, and join the table being iterated instead. This iterator component is limited to a maximum of 5000 iterations.

Properties

Name
string
required
A human-readable name for the component.
Mode
drop-down
required
  • Basic: Construct the query using the clickable properties. This is the default setting.
  • Advanced: Manually write the SQL query.
Database
drop-down
required
Only if Mode is Basic.The Snowflake database. The special value [Environment Default] uses the database defined in the environment. Read Databases, Tables and Views - Overview to learn more.
Schema
drop-down
required
Only if Mode is Basic.The Snowflake schema. The special value [Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.
Target table
drop-down
required
The name of the target table. Only if Mode is Basic.
Query
code editor
required
Manually write the SQL query if Mode is set to Advanced.
Concurrency
drop-down
required
  • Concurrent: Iterations are run concurrently.
  • Sequential: Iterations are done in sequence, waiting for each to complete before starting the next. This is the default setting.
Full SaaS deployments are limited to 20 concurrent tasks, with additional tasks being queued. Hybrid SaaS deployments have 20 concurrent tasks per instance, with a maximum of 100 instances if configured accordingly.
Column mapping
column editor
required
Map the columns in the target table to project or pipeline variables. Click + to add a mapping and enter the following:
  • Column name: Select a table column name.
  • Variable name: Select an existing variable name.
Toggle Text mode to write the mapping manually as a text expression instead.
Order by
dual listbox
Move columns to the right-hand box to define the “order by” sequence.This property is only available when Concurrency is set to Sequential.
Sort
drop-down
Choose to order by ascending or descending. The default is ascending.This property is only available when Concurrency is set to Sequential.
Break on failure
drop-down
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.
Stop on condition
drop-down
required
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.
Stop on condition mode
drop-down
Select the method for creating the stop condition.
  • Simple: A no-code condition editor opens, where you specify an Input Variable, Qualifier, Comparator, and Value. This is the default setting.
  • Advanced: A code editor opens, where you write the condition manually using SQL.
This property is only available when Stop on condition is set to Yes.
Condition (simple mode)
columns editor
Click the gear icon to open the Condition dialog. Use + and - to add or remove conditions. Each condition has the following columns:Input variable: An input variable to form a condition around.Qualifier: Select whether the condition should be applied (Is, the default) or reversed (Not). Selecting Not reverses the comparator, so Equal to becomes “not equal to”, Less than becomes “greater than or equal to”, and so on.Comparator: Select from:
  • Less than: Value of the input variable must be less than the specified value.
  • Less than or equal to: Value of the input variable must be less than or equal to the specified value.
  • Equal to: Value of the input variable must be equal to the specified value.
  • Greater than or equal to: Value of the input variable must be greater than or equal to the specified value.
  • Greater than: Value of the input variable must be greater than the specified value.
  • Blank: Checks whether the input variable is empty.
Value: The value to compare against.Toggle Text mode to write the condition manually as a JavaScript expression instead.Toggle Use Grid Variable to use a grid variable to define the condition.This property is only available when Stop on condition mode is set to Simple.
Condition (advanced mode)
code editor
Enter the condition manually in the code editor using SQL.This property is only available when Stop on condition mode is set to Advanced.
Combine conditions
drop-down
When multiple conditions are present, they can be separated by And or Or.
  • And: All the conditions must be true.
  • Or: Any of the conditions must be true.
This property is only available when Stop on condition is set to Yes and Stop on condition mode is set to Simple.
Maximum concurrent iterations
integer
Use this to set a maximum limit on the number of concurrent iterations that will be attempted. This is important to ensure that the workload is orchestrated to accommodate any source and target constraints.If you leave this property blank, no upper limit will be placed on the number of concurrent tasks that can be attempted.If you stack iterators, concurrency limits will multiply exponentially. For example, if you stack an iterator with Maximum concurrent iterations set to 10 on top of another iterator with Maximum concurrent iterations set to 10, the component could attempt 100 concurrent iterations.This property is only available when Concurrency is set to Concurrent.
Record values in task history
boolean
If this is set to Yes, the Task history tab and Observability dashboard will show each iterator variable as a name/value pair in the component result message for each iteration. The default is Yes.
Record values in task history
boolean
If this is set to Yes, the Task history tab and Observability dashboard will show each iterator variable as a name/value pair in the component result message for each iteration. The default is Yes.

Counting the number of iterations

The Table Iterator determines the number of rows to iterate at runtime, based on the contents of the target table. You can count the number of iterations using System variables.