Batch Merge Connector

Version 23.3.8698


Batch Merge Connector


Overview

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.

Connector Configuration

This section contains all of the configurable connector properties.

Settings Tab

Configuration

Settings that determine how the connector can be accessed.

  • Connector Id The static, unique identifier for the connector.
  • Connector Type Displays the connector name and a description of what it does.
  • Connector Description An optional field to provide a free-form description of the connector and its role in the flow.
  • XPath Which repeated XML element to use when merging Batch Messages. See XPath Usage Example for more details.
  • Local File Scheme A scheme for assigning filenames to messages that are output by the connector. You can use the following macros to reference contextual information:
    %ConnectorId%, %Filename%, %FilenameNoExt%, %Ext%, %ShortDate%, %LongDate%, %RegexFilename%, %DateFormat%, %Header%.
    For example: %FilenameNoExt%_%ShortDate%%Ext%

Message

  • Save to Sent Folder Check this to copy files processed by the connector to the Sent folder for the connector.
  • Sent Folder Scheme Instructs the connector to group messages in the Sent folder according to the selected interval. For example, the Weekly option instructs the connector to create a new subfolder each week and store all messages for the week in that folder. The blank setting tells the connector to save all messages directly in the Sent folder. For connectors that process many messages, using subfolders helps keep messsages organized and improves performance.

Logging

  • Log Level The verbosity of logs generated by the connector. When you request support, set this to Debug.
  • 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 helps keep logs organized and improves performance.
  • Log Messages Check this to have the log entry for a processed file include a copy of the file itself. If you disable this, you might not be able to download a copy of the file from the Input or Output tabs.

Miscellaneous

Miscellaneous settings are for specific use cases.

  • Other Settings Enables you to configure hidden connector settings in a semicolon-separated list (for example, setting1=value1;setting2=value2). Normal connector use cases and functionality should not require the use of these settings.

Automation Tab

Automation Settings

  • Send When checked, the connector automatically merges Batch Groups as soon as they arrive in the Send folder (Input tab). If you uncheck this, you must manually instruct the connector to merge Batch Groups.

Performance

Settings related to the allocation of resources to the connector.

  • Max Workers The maximum number of worker threads consumed from the threadpool to process files on this connector. If set, this overrides the default setting on the Settings > Automation page.
  • Max Files The maximum number of files sent by each thread assigned to the connector. If set, this overrides the default setting on the Settings > Automation page.

XPath Usage Example

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>

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

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

If you set the value for XPath 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>