FlatToHierarchyLoop - 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

FlatToHierarchyLoop

Purpose

Loop, emitting nested recursive elements based on their level in a flat set of input elements.

Description

This loop function can be used only in the loop expression tab and allows you to create nested recursive elements in the output based on a level number in the input.

To illustrate, if the level number is always one, this functions identically to the SimpleLoop function. When the level number is 2, a nested element (that is the same as the enclosing output element) is emitted. For each increment of the level number a new level of nesting is created. It is assumed that the level number will increase and decrease monotonically over the input.

Argument

Input map element ([Map] Element)

An input map element that loops.

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.