Step 2: Setting the command to enable the output stream feature - 8.0

Data Integration Job Examples

Version
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2024-02-06
Now you will use tJava to set the command for creating an output file and a directory that contains the output file.

Procedure

  1. Drop a tJava component onto the design workspace, and double-click it to open the Basic settings view to set its properties.
    Screenshot of the component basic settings.
  2. Fill in the Code area with the following command:
    new java.io.File("C:/myFolder").mkdirs(); 
    globalMap.put("out_file",new java.io.FileOutputStream("C:/myFolder/customerselection.txt",false));
    Tip:

    The command you typed in this step will create a new directory C:/myFolder for saving the output file customerselection.txt. You can customize the command in accordance with actual practice.

  3. Connect tJava to tFileInputDelimited using a Trigger > On Subjob Ok connection.
    This will trigger the subJob that starts with tFileInputDelimited when tJava succeeds in running.
    Screenshot of the Job in the Designer.