Skip to main content Skip to complementary content

Configuring the Job for redirecting the standard output to a file

Procedure

  1. Double-click the tJava component and in the Code field on its Basic settings view, enter the following code:
    java.io.File file = new java.io.File("d:/mytalend.log");
    java.io.PrintStream log_java = new java.io.PrintStream(new java.io.FileOutputStream(file));
    System.setOut(log_java);

    The standard output of the entire Job will be redirected to the file d:/mytalend.log.

  2. Double-click the first tFixedFlowInput component to open its Basic settings view.
  3. Click the […] button next to Edit schema and in the dialog box displayed, define the schema by adding three columns: id of Integer type, name and team of String type.
  4. In the Mode area, select Use Inline Content (delimited file) and in the Content field, enter the following input data for the first tFixedFlowInput component:
    1;Lily;QA
    2;Kevin;DEV
    3;Daniel;DEV
  5. Double-click the tFileOutputDelimited component and on its Basic settings view, select the Use Output Stream check box and enter System.out in the Output Stream field.
  6. Click the Sync columns button to retrieve the schema from the previous component.
  7. Double-click the second tFixedFlowInput component to open its Basic settings view.
  8. Define the schema by adding three columns, same as the first tFixedFlowInput component.
  9. In the Mode area, select Use Inline Content (delimited file) and in the Content field, enter the following input data for the second tFixedFlowInput component:
    4;Allen;DOC
    5;Judy;DOC

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!