Splitting a file into several outputs - 8.0

Talend Data Mapper User Guide

Version
8.0
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
2024-03-28

Filter records in an XML file and write the output to three different CSV files.

About this task

This example uses the following XML sample as input:
<orders>
   <order>
      <orderId>ih3fPC</orderId>
      <lastName>Chester</lastName>
      <firstName>Harding</firstName>
      <region>US</region>
   </order>
   <order>
      <orderId>vF7lNh</orderId>
      <lastName>Bill</lastName>
      <firstName>Madison</firstName>
      <region>EMEA</region>
   </order>
   <order>
      <orderId>l7xZ4P</orderId>
      <lastName>George</lastName>
      <firstName>Harding</firstName>
      <region>APAC</region>
   </order>
   <order>
      <orderId>dTTrNO</orderId>
      <lastName>Abraham</lastName>
      <firstName>Roosevelt</firstName>
      <region>US</region>
   </order>
   <order>
      <orderId>wZlWOj</orderId>
      <lastName>William</lastName>
      <firstName>Quincy</firstName>
      <region>APAC</region>
   </order>
</orders>

The goal of the transformation is to split this file based on the value of the region element.