Skip to main content Skip to complementary content
  • New archived content: Talend MDM, Talend Data Catalog 8.0, and Talend 7.3 products reached their end of life in 2024. Their documentation was moved to the Talend Archive page and will no longer receive content updates.
Close announcements banner

Splitting a file into several outputs

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.

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!