Using tJavaRow to display row information

Although tLogRow is flexible and very useful, it does have some limitations, in that it only prints what is defined in a schema. tJavaRow doesn't have the same limitations. This recipe will show you how it can be utilized.

Getting ready

Open the jo_cook_ch10_0060_tJavaRow job.

How to do it...

The steps for using tJavaRow to display row information are as follows:

  1. Run the job. You will see data in the console output sorted by customer key.
  2. Remove the tLogRow component, and add a tJavaRow component in its place.
  3. Open the tJavaRow component and add the following code:
    //Test for change of key and print heading lines if key has changed if (Numeric.sequence(input_row.name, 1, 1) == 1){ System.out.println("\n\n******************** ...

Get Talend Open Studio Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.