Configuring the output components and viewing the Job execution result - 7.0

Data Integration Job Examples

author
Talend Documentation Team
EnrichVersion
7.0
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
Design and Development > Designing Jobs
EnrichPlatform
Talend Studio

Procedure

  1. Double-click the first tFileOutputDelimited component to display its Basic settings.
  2. In the File Name field, specify the path and name of the file to write with the valid data.
  3. Define the row and field separators in the corresponding fields.
  4. Select the Include Header check box to include column headers in the output data.
  5. Repeat the steps above on the second tFileOutputDelimited component to configure the output of the rejected data.
  6. Double-click the tJava component to display its Basic settings.
  7. In the Code field, type in the code that will display the number of updated, inserted and rejected lines processed:
    System.out.println("Valid data: "+((Integer)globalMap.get("tFileOutputDelimited_1_NB_LINE"))+"\nRejected
    data: "+((Integer)globalMap.get("tFileOutputDelimited_2_NB_LINE")));
  8. Save your Job and press F6 to execute it.

Results

Valid data is outputted in the first delimited file and rejects to the second, and the console displays the number of valid lines and the number of rejects processed in the Job.