Expression Basics - 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

Expressions are powerful but simple. Every expression returns a single value, which is used by its parent expression. The value of the expression at the root of the expression panel is the final value used according to the purpose of the panel. For example, the value of the root expression in the value expression panel becomes the value of the output map element.

Example 1. Simple Expression Example

Transaction-856/Segment-ISA/Element-I01 1

1

An input map element reference, provides the value of the input map element.

In this example for a value expression panel, the root expression is a map element reference expression that refers to Element-I01 in the input panel. This is the expression tree you get if you drag an input map element to an output map element.


Example 2. More Complex Expression Example

Concat 1
  Person/LastName 2
  Constant ", " 3
  Person/FirstName

1

The concatenation function, concatenates all of the arguments. In this case there are three arguments, the last name, a constant comma, and the first name.

2

An input map element reference, provides the value of the input map element.

3

A constant expression, providing a constant value, in this case a comma followed by a space.

In this example for a value expression panel, the root expression is the concatenation function which has three arguments. The first and third are map element references to input elements. The second is a constant expression containing a comma. The result of this expression would be something like Smith, John.