Batch Merge Connector

Version 22.0.8473


Batch Merge Connector


In CData Arc, data travels through flows as Messages that consist of a body and metadata headers. For example, if one connector passes a file to another, the file is transmitted as a Message that contains the file in the body and metadata about the file and associated connectors as headers. Messages can be grouped together in Batch Groups, which allow multiple messages to travel together as a single unit. Some uses for Batch Groups include moving data between systems and processing multiple purchase orders at once. When a Message is part of a Batch Group, it is referred to as a Batch Message.

The Batch Merge connector accepts a Batch Group that arrives in the Send folder (the Input tab of the connector settings pane) and merges the Batch Messages in the Batch Group into a single Message. The output Message passes down the flow through the Output tab, and it can be processed by other connectors as needed.

Note: The Batch Merge connector can only accept Batch Groups as inputs. If the connector receives an individual message as an input, it throws an error message.

Configuring Batching Settings

XPath

In the connector configuration pane, the Configuration section of the Settings tab contains the XPath field. The connector uses the value in this field to determine what repeated XML element to use when merging the Batch Messages. The example below shows a simple XML tree of a Batch Message:

<Orders>
    <Shipping>
        <Item>Paper</Item>
        <Quantity>100</Quantity>
        <Recurring>Yes</Recurring>
    </Shipping>
    <Shipping>
        <Item>Eraser Bulk</Item>
        <Quantity>20</Quantity>
        <Recurring>No</Recurring>
    </Shipping>
</Orders>

And the example below shows a similar, separate Batch Message in the Batch Group:

<Orders>
    <Shipping>
        <Item>Pencil, Box 100</Item>
        <Quantity>10</Quantity>
        <Recurring>Yes</Recurring>
    </Shipping>
</Orders>

If the value for XPath was set to /Orders/Shipping, the output message would merge like this:

<Orders>
    <Shipping>
        <Item>Paper</Item>
        <Quantity>100</Quantity>
        <Recurring>Yes</Recurring>
    </Shipping>
    <Shipping>
        <Item>Eraser Bulk</Item>
        <Quantity>20</Quantity>
        <Recurring>No</Recurring>
    </Shipping>
    <Shipping>
        <Item>Pencil, Box 100</Item>
        <Quantity>10</Quantity>
        <Recurring>Yes</Recurring>
    </Shipping>
</Orders>

Automation

In the Automation tab of the connector configuration pane, the Automation Settings section contains a checkbox labelled Send. If selected, the connector automatically merges Batch Groups as soon as they arrive in the Send folder (Input tab). Otherwise, if this option is cleared, you must manually instruct the connector to merge Batch Groups.