Merge Connector

Version 21.0.8222


Merge Connector


The Merge Connector merges multiple XML files into a unified XML file.

概要

The Merge Connector is configured with a Repeat XPath setting that determines which data in the input XML is merged into the output file. The output file includes the data ‘inside’ the configured xpath (i.e. all children of the configured xpath) for each input XML file. Data before/above the configured xpath is taken from the first input XML file, and data after/below the configured xpath is taken from the last input XML file.

The スケジュール送信 automation setting instructs the connector to wait for a specified interval and merge all XML input files in the Input/Send Folder when that interval elapses. The standard Send automation setting instructs the connector to automatically process input files; files that should be merged together must be placed in a shared subfolder within the Input/Send Folder.

Connector Configuration

This section contains all of the configurable connector properties.

Settings Tab

Configuration

Settings related to the core operation of the connector.

  • Connector Id The static name of the connector. All connector-specific files are held in a folder by the same name within the Data Directory.
  • Connector Description An optional field to provide free-form description of the connector and its role in the flow.
  • Repeat XPath The path in the XML structure to the element where data should be merged. All data inside this xpath, for each input XML file, will be added to the output file. Data above/before this xpath will be taken from the first input XML file, and data after/below this xpath will be taken from the last input XML file.

Other Settings

Settings not included in the previous categories.

  • Log Subfolder Scheme Instructs the connector to group files in the Logs folder according to the selected interval. For example, the Weekly option instructs the connector to create a new subfolder each week and store all logs for the week in that folder. The blank setting tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders can help keep logs organized and improve performance.
  • Log Messages Whether the log entry for a processed file will include a copy of the file itself.
  • Save to Sent Folder Whether files processed by the connector should be copied to the Sent folder for the connector.

Automation

Settings related to the automatic processing of files by the connector.

  • オートメーションを有効化 Whether messages arriving at the connector will automatically be processed.
  • 送信 If enabled, the Merge Connector will automatically process files arriving in the Send フォルダ without waiting for files to accumulate.
  • スケジュール送信 If enabled, a 送信間隔 should be specified to allow files to accumulate in the Send フォルダ; once the interval elapses, the connector will merge all accumulated input files.

Example

Below is an example set of input XML files and the corresponding single output file.

Input

This example will merge three XML files with similar structure:

<Items>
  <Interchange>
    <Id>1</Id>
    <TransactionSet>
      <Data>Transaction Data 1</Data>
    </TransactionSet>
  </Interchange>
</Items>
<Items>
  <Interchange>
    <Id>2</Id>
    <TransactionSet>
      <Data>Transaction Data 2</Data>
    </TransactionSet>
  </Interchange>
</Items>
<Items>
  <Interchange>
    <Id>3</Id>
    <TransactionSet>
      <Data>Transaction Data 3</Data>
    </TransactionSet>
  </Interchange>
</Items>

Output

In this example, the Repeat XPath field is set to ‘/Items/Interchange/TransactionSet’. The resulting output merges the data within the TransactionSet elements and takes the Id element from the first input file.

<Items>
	<Interchange>
		<Id>1</Id>
		<TransactionSet>
			<Data>Transaction Data 1</Data>
		</TransactionSet>
		<TransactionSet>
			<Data>Transaction Data 2</Data>
		</TransactionSet>
		<TransactionSet>
			<Data>Transaction Data 3</Data>
		</TransactionSet>
	</Interchange>
</Items>