The Interleaved Merge function takes data from two or more input elements and merges them to create one record in the mapped output node. For example, where an address has been split into multiple input source nodes (line 1, line 2, and so on) but the destination expects only a single node.

Interleaved Merge functions are available as part of the Data Transformation Layer (DTLClosed When used as part of a BPA Platform tool, the Data Transformation Layer (DTL) extend the tool's functionality by transforming SML from schema to another. In addition, several transformation functions are available for use with the input data before such data is mapped to the destination schema.) feature.

Adding an Interleaved Merge Function

Interleaved Merge functions are used in the Mapping tab of the following tools:

Microsoft SQL Server Connector
Run Microsoft Reporting ServicesClosed The Run Microsoft Reporting Services tool automates the running of Microsoft Reporting Services (MSRS) reports.
Transform DataClosed Transform Data is a Format tool that enables a new structure to be created from an existing XML or recordset data source. The output generated by this tool is ready for use in a destination system which consumes or requires XML.
Web Service Connector
  1. Open the relevant task step and go to the Mapping tab.
  1. Click Functions to expand the Functions pane.
  2. Expand the Looping node and drag Interleaved Merge to the Transformation Mappings pane.
  3. Drag the relevant Input Data source node or element to the new icon.
  4. Do the same for the receiving Output Data node or elements.
  5. Double-click the icon.

The Transformation Mappings pane is replaced with the Interleaved Merge's configuration pane:

Data Transformation Layer - Interleaved Merge

  1. Enter a meaningful Function Name.
  2. The input (source) and output (destination) links created previously now appear in the Inputs and Output tabs. If you have more than one connected input or output, it is recommended you Edit each Parameter in turn and rename it.
  3. To change an existing mapping, either Inputs or Output, use the drop-down lists under Mapped To to select a new node or element.

In the example above, we are taking inputs for First_Name and Last_Name and merging them, presumably to output to a Name element.

Selecting Error Handling Options

Use the Options tab to define error handling behaviour for this function.

At task run-time, if a mapped input element is not included in the received input recordset or XML, you can choose to:

Output an empty String — An empty string is passed to the mapped output node at task run time, for example, <country></country>.
Output no Data — The element isn't included in the output XML.
Output Value — Enter a static value in the provided text box; this value is passed to the mapped output at task run-time.
Error — The function logs an error to the BPA Platform Event Log. Depending on the parent task step's own error handling options, the task can either continue or fail completely.

If the number of received inputs nodes doesn't match the number of mapped input nodes, you can choose to:

Error — The function logs an error to the BPA Platform Event Log. Depending on the parent task step's own error handling options, the task can either continue or fail completely.
Produce output for each element in a last cardinal input — The function does its best to fulfil all mappings and ignores any errors it encounters.

Click OK to save the function and return to the parent task step's Mapping tab.