Skip to main content Skip to complementary content

Creating a Job to split and flatten an XML file

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.

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!