IndexRangeLoop - 6.3

Talend Data Mapper User Guide

EnrichVersion
6.3
EnrichProdName
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend Studio

Name

IndexRangeLoop

Purpose

Loop extracting a range of input iterations.

Description

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 and selecting only iterations of the loop that fall between the start and end index values, and before the end condition is met.

This is useful in the processing of something like the X12 EDI HL loop where it is desirable to process only a range of iterations from the input, and to allow this range to terminate with a certain condition.

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

Argument

Input map element ([Map] Element)

An input map element that loops.

Argument

Start Index (Integer)

The first index (inclusive) of the input map element's loop to consider. This is optional and if not specified it will take all iterations before the end index.

Argument

End Index (Integer)

The last index (inclusive) of the input map element's loop to consider. This is optional, if not specified, it will take all iterations after the start index.

Argument

End Condition (Boolean)

An expression that, when true, indicates the looping should stop. This is optional.

Argument

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.

Argument

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

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

Argument

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.