O'Reilly logo

Talend Open Studio Cookbook by Rick Barton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using intermediate variables in tMap

The tMap component is the most flexible and most used component in Talend, despite having the limitation on multiple lines for an expression. In the previous recipe, we saw how ternary expressions can be used to extend the capability of the tMap expressions. In this recipe, we will see that the tMap variables can also extend the capability of tMap.

Getting ready

Open the job jo_cook_ch04_0040_tMapVariables.

How to do it…

  1. In the Var section, click + to add a new variable, set the name to paymentTotal and Type to float, as shown in the following screenshot:
    How to do it…
  2. Insert the following code into the expression field:
    customer.payment1+customer.payment2+customer.payment3+customer.payment4+customer.payment5+customer.payment6 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required