Skip to main content
The Split connector splits a single XML file into multiple XML files.

Key Capabilities

  • XPath-based XML file splitting for batch record separation into individual files
  • Configurable batch grouping with wildcard XPath support for dynamic element matching
  • Max records per file control for output file size management

Overview

The Split connector is configured with an XPath upon which input XML files should be split into multiple output XML files. This is useful when an XML file contains a batch of data such as multiple orders, multiple line items, or multiple customer records. The Split connector splits this batched XML data into a separate XML file for each order, item, or record. See the Split Examples for more information.

Connector Configuration

This section contains all of the configurable connector properties.

Settings Tab

Configuration

Settings related to the core operation of the connector.
SettingDescription
Connector IdThe static, unique identifier for the connector.
Connector TypeDisplays the connector name and a description of what it does.
Connector DescriptionAn optional field to provide a free-form description of the connector and its role in the flow.
XPathThe path in the XML structure to the element upon which the split should occur. Each unique occurrence of the specified XPath results in a unique output XML file.

Advanced Settings

Settings not included in the previous categories.
SettingDescription
Batch SizeControls how many messages are put into a batch group. The default is 1, which means a batch group is not created. If you set it to a value less than 1, all messages are contained in a single batch group. If you set it to a value greater than 1, each batch group contains the number of messages indicated here. See the Split Examples for more information.
Max RecordsThe maximum number of records to include in a single output message. Use -1 to indicate that all output records should be put in a single file, and use 0 to indicate that the connector can decide based on the configured Output File Format. By default, XML outputs one record per file, and flat file formats include all records in one file.
Local File SchemeA scheme for assigning filenames to messages that are output by the connector. You can use macros in your filenames dynamically to include information such as identifiers and timestamps. For more information, see Macros.

Advanced Tab

Logging

Other Settings

SettingDescription
Processing DelayThe amount of time (in seconds) by which the processing of files placed in the Transactions tab is delayed. This is a legacy setting. Best practice is to use a File connector to manage local file systems instead of this setting.

Miscellaneous

Automation Tab

Automation

Settings related to the automatic processing of files by the connector.
SettingDescription
SendWhether messages arriving at the connector are automatically processed.

Performance

Alerts Tab

SLAs Tab

Split Examples

Below is an example XML input file that contains multiple TransactionSet elements (in other words it contains a batch of transactions):
<Items>
  <Interchange>
    <Id>1</Id>
    <TransactionSet>
      <Data>value1</Data>
    </TransactionSet>
    <TransactionSet>
      <Data>value2</Data>
    </TransactionSet>
    <TransactionSet>
      <Data>value3</Data>
    </TransactionSet>
    <TransactionSet>
      <Data>value4</Data>
    </TransactionSet>
  </Interchange>
</Items>
The Split connector can split this input file into four separate output files, one for each TransactionSet element. To accomplish this, set the XPath field to the XPath to the TransactionSet element: /Items/Interchange/TransactionSet An output file for each TransactionSet would result. One example is shown below. Output 1:
<Items>
  <Interchange>
    <Id>1</Id>
    <TransactionSet>
      <Data>value1</Data>
    </TransactionSet>
  </Interchange>
</Items>
If you set Batch Size to 2, the connector outputs two batch groups, each with two messages. One example batch group is shown below. Batch 1 Batch Message 1:
<Items>
  <Interchange>
    <Id>1</Id>
    <TransactionSet>
      <Data>value1</Data>
    </TransactionSet>
  </Interchange>
</Items>
Batch Message 2:
<Items>
  <Interchange>
    <Id>1</Id>
    <TransactionSet>
      <Data>value2</Data>
    </TransactionSet>
  </Interchange>
</Items>

XPath Wildcards

The XPath can include a wildcard character (*) to split on all elements at a given XPath. For example, the input XML might contain multiple groups of data that need to be split into separate files, but the groups of data have different element names:
<Items>
  <Group1>
    <Data>value1</Data>
  </Group1>
  <Group2>
    <Data>value2</Data>
  </Group2>
  <Group3>
    <Data>value3</Data>
  </Group3>
</Items>
Split these groups by setting the XPath to the following value: /Items/* The following three output files would result: Output 1:
<Items>
  <Group1>
    <Data>value1</Data>
  </Group1>
</Items>
Output 2:
<Items>
  <Group2>
    <Data>value2</Data>
  </Group2>
</Items>
Output 3:
<Items>
  <Group3>
    <Data>value3</Data>
  </Group3>
</Items>

Macros

Examples