tLoop Properties in Spark Batch Jobs - 6.1

Talend Components Reference Guide

Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
Talend Studio
Data Governance
Data Quality and Preparation
Design and Development

Component family



Basic settings

Loop Type

Select a type of loop to be carried out: either For or While.

For: The task or Job is carried out for the defined number of iteration

While: The task or Job is carried until the condition is met.



Type in the first instance number which the loop should start from. A start instance number of 2 with a step of 2 means the loop takes on every even number instance.



Type in the last instance number which the loop should finish with.



Type in the step the loop should be incremented of. A step of 2 means every second instance.


Values are increasing

Select this check box to only allow an increasing sequence. Deselect this check box to only allow a decreasing sequence.



Type in an expression initiating the loop.



Type in the condition that should be met for the loop to end.



Type in the expression showing the operation to be performed at each loop.

Usage in Spark Batch Jobs

tLoop is to be used as a start component and can only be used with an iterate connection to the next component.

Global Variables

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

CURRENT_VALUE: the current value. Only available for a For type loop. This is a Flow variable and it returns an integer.

CURRENT_ITERATION: the sequence number of the current iteration. This is a Flow variable and it returns an integer.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio User Guide.


If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide.

For more information on the log4j logging levels, see the Apache documentation at

Spark Connection

You need to use the Spark Configuration tab in the Run view to define the connection to a given Spark cluster for the whole Job. In addition, since the Job expects its dependent jar files for execution, one and only one file system related component from the Storage family is required in the same Job so that Spark can use this component to connect to the file system to which the jar files dependent on the Job are transferred:

This connection is effective on a per-Job basis.