Mapping variables

Talend ESB Studio User Guide

EnrichVersion
6.4
EnrichProdName
Talend ESB
task
Design andĀ Development
EnrichPlatform
Talend Studio

The Var table (variable table) regroups all mapping variables which are used numerous times in various places.

You can also use the Expression field of the Var table to carry out any transformation you want to, using Java Code.

Variables help you save processing time and avoid you to retype many times the same data.

There are various possibilities to create variables:

  • Type in freely your variables in Java. Enter the strings between quotes or concatenate functions using the relevant operator.

  • Add new lines using the plus sign and remove lines using the red cross sign. And press Ctrl+Space to retrieve existing global and context variables.

  • Drop one or more Input entries to the Var table.

Select an entry on the Input area or press Shift key to select multiple entries of one Input table.

Press Ctrl to select either non-appended entries in the same input table or entries from various tables. When selecting entries in the second table, notice that the first selection displays in grey. Hold the Ctrl key down to drag all entries together. A tooltip shows you how many entries are in selection.

Then various types of drag-and-drops are possible depending on the action you want to carry out.

To...

You need to...

Insert all selected entries as separated variables.

Simply drag & drop to the Var table. Arrows show you where the new Var entry can be inserted. Each Input is inserted in a separate cell.

Concatenate all selected input entries together with an existing Var entry.

Drag & drop onto the Var entry which gets highlighted. All entries gets concatenated into one cell. Add the required operators using Java operations signs. The dot concatenates string variables.

Overwrite a Var entry with selected concatenated Input entries.

Drag & drop onto the relevant Var entry which gets highlighted then press Ctrl and release. All selected entries are concatenated and overwrite the highlighted Var.

Concatenate selected input entries with highlighted Var entries and create new Var lines if needed

Drag & drop onto an existing Var then press Shift when browsing over the chosen Var entries. First entries get concatenated with the highlighted Var entries. And if necessary new lines get created to hold remaining entries.

How to access global or context variables

Press Ctrl+Space to access the global and context variable list.

Appended to the variable list, a metadata list provides information about the selected column.

How to remove variables

To remove a selected Var entry, click the red cross sign. This removes the whole line as well as the link.

Press Ctrl or Shift and click fields for multiple selection then click the red cross sign.