SimpleLoop - 6.3

Talend Data Mapper User Guide

Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Design and Development
Talend Studio




Loop according to some input map element.


This loop function can be used only in the loop expression tab and specifies that the output map element associated with the loop expression tab is to loop corresponding to the value of the input map element argument expression.

When an input map element is mapped to an output map element that loops, the SimpleLoop function is automatically created at the nearest ancestor looping output element to define the loop.

If no sort keys are specified, the order of the output is the same order as the input elements.


Input map element ([Map] Element)

An input map element that loops.


Filters (Boolean)

Specify an expression that returns a boolean. This expression is evaluated for each instance of the loop. If this filter expression returns true, the instance is included in the loop. If it returns false, the instance is excluded from the loop.


Sort Keys (Variable) (Either AscendingSortKey or DescendingSortKey functions)

Any number of AscendingSort or DescendingSort functions that specify each sort key.


Contexts (Either NestedContext or EnclosingContext functions)

Specify either the EnclosingContext and/or NestedContext function. EnclosingContext specifies the output map element that encloses this loop. If not specified, the nearest looping ancestor map element is used.

NestedContext allows another loop expression to be specified within this loop expression.


Emit Loop Instance If Empty

Select this if you wish that a single instance of this loop be generated in the output if there are no instances of the input loop. This is useful to generate loop instance with a default value.


Distinct Child Element

Provide the input map element to be used to select distinct values. Sadly, you have to type in the element name here. This name is a relative path of the element below the input map element specified as an argument. If there is a namespace involved include that. For example, if the input map element is a database row, then the distinct child element might be Database:CustomerNumber. If selected, only iterations of the loop that have distinct values for the selected element are considered. If this is not selected, all instances of the input map element are considered.

When a loop contains duplicated sub-elements, the Distinct Child Element field provides a filter to get only one instance of each distinct sub-element. You can use this option to combine with the Group by loop filter of a Talend Data Mapper map.


Stream Input

Allows the input data for this loop to be broken into chunks and processed separately. Without this option, the entire input data is read into memory before the transformation is executed. When Stream Input is specified, since the transformation is processed in segments, input data of unlimited size can be processed. See the section on Streaming Execution for more information.


When Stream Input is selected there are some significant restrictions on the transformation expressions. These restrictions are described in the section on Streaming Execution.