Creating a Job to split and flatten an XML file - 7.3

Talend Data Mapper User Guide

Version
7.3
Language
English
Product
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2023-01-05

Procedure

  1. In the Integration perspective, right-click the Job Designs node and click Create Standard Job.
  2. Enter a name, purpose and description for your Job, then click Finish.
  3. Add the following components to your design workspace:
    • A tFileInputRaw
    • A tHMap
    • Three tFileOutputRaw
  4. Link the tFileInputRaw to the tHMap with a Row > Main connection.
  5. Link the tHMap to the three tFileOutputRaw components with Row > Main connections, enter an name for the connection and click Yes when asked if you want to get the schema from the target component.
    The name of the output connection must be the same as the name of the root element of the output in the flattening map. In this example, the connection names should be mondial_map_out_1, mondial_map_out_2 and mondial_map_out_3.
  6. Double-click the tFileInputRaw and click the ... button to the right of Filename to select your input file, then select UTF-8 in the Encoding drop-down list.
  7. Click the tHMap component and open the Component tab.
  8. In the Map Path field, select the flattening map that you created.
  9. Double-click the tFileOutputRaw components, enter the filename for each output file to create and select UTF-8 in the Encoding drop-down list.
    In this example, the files are named C:/Users/jsmith/Documents/countries.csv, C:/Users/jsmith/Documents/cities.csv and C:/Users/jsmith/Documents/provinces.csv
  10. Open the Run tab and click Run.

Results

The Job runs and the three files are created in the selected folder.