Skip to main content Skip to complementary content

Step 4: Outputing the selected data stream

Procedure

  1. Drop a tFileOutputDelimited component onto the design workspace, and double-click it to open the Basic settings view to set its component properties.
  2. Select the Use Output Stream check box to enable the Output Stream field and fill the Output Stream field with the following command:
    (java.io.OutputStream)globalMap.get("out_file")
    Information noteNote:

    You can customize the command in the Output Stream field by pressing Ctrl+Space to select built-in command from the list or type in the command into the field manually in accordance with actual practice. In this scenario, the command we use in the Output Stream field will call the java.io.OutputStream class to output the filtered data stream to a local file which is defined in the Code area of tJava in this scenario.

  3. Connect tFileInputDelimited to tMap using a Row > Main connection and connect tMap to tFileOutputDelimited using a Row > out1 connection which is defined in the Map Editor of tMap.
  4. Click Sync columns to retrieve the schema defined in the preceding component.
  5. Drop a tLogRow component onto the design workspace, and double-click it to open its Basic settings view.
  6. Select the Table radio button in the Mode area.
  7. Connect tFileOutputDelimited to tLogRow using a Row > Main connection.
  8. Click Sync columns to retrieve the schema defined in the preceding component.

    This Job is now ready to be executed.

  9. Press Ctrl+S to save your Job and press F6 to execute it.

    The content of the selected data is displayed on the console.

    The selected data is also output to the specified local file customerselection.txt.

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!