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

Creating pseudo components using tJavaFlex

The tJavaFlex component is similar to the tJavaRow component, in that it is included into a flow. The difference between the two components is that the tJavaFlex component has pre and post processes that are performed before and after the individual rows are processed, so it is similar to a pre-built Talend component.

Getting ready

Open the job jo_cook_ch05_0030_tJavaFlex.

How to do it…

  1. Open the tJavaFlex component.
  2. In the Start Code section, enter the following:
    String allNames = "";
    Integer NB_LINE = 0;
  3. In the Main Code section enter the following:
    allNames = allNames + row1.name + "|";
    NB_LINE += 1;
  4. In the End Code section, enter the following:
    globalMap.put("allNames", allNames); globalMap.put("tJavaFlex_1_NB_LINE", ...

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