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

Data Integrationジョブの例

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
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 Open Studio for MDM
Talend Real-Time Big Data Platform
task
ジョブデザインと開発 > ジョブデザイン
EnrichPlatform
Talend Studio

Now we will make use of 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.
  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));
    Note:

    The command we 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 tJava when subjob that starts with tFileInputDelimited succeeds in running.