Skip to main content Skip to complementary content

Configuring a Job using a tJavaRow component

This use case shows that it is possible to access the input flow using a dedicated variable and following a specific syntax such as: input_row.name. The source data is processed at runtime by the tJavaRow component.

A common Job using tJavaRow is generally composed of:

  • a tFileInputDelimited component to read data from a text file,
  • a tJavaRow to apply transformation to the data processed,
  • a tLogRow component to print data in the console.

Procedure

  1. In the Palette, slide a tFileInputDelimited , a tJavaRow and a tLogRow component onto the workspace.
  2. Connect tFileInputDelimited to tJavaRow and tJavaRow to tLogRow using a Row > Main link.
  3. Set the Basic settings of the tFileInputDelimited component.
  4. Double-click on tFileInputDelimited to display its Basic settings. The tFileInputDelimited reads the same text file and use the same schema as in the tJava example .
  5. When prompted, click OK to accept the propagation or click afterward on the Sync columns button in the Basic settings view of tJavaRow.
  6. Double-click on tJavaRow to display its Basic settings view and add the following code in the Code area:
    output_row.id = input_row.id;
    output_row.name = (input_row.name).toUpperCase();
    Information noteNote: This code converts the column names to upper case.
  7. Execute the Job by pressing F6.

Results

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!