Merge

Merge two documents together by matching on the value at the specified Path's in each document. Use this Node to merge related data from a secondary dataset into the correct place within a parent dataset. The documents can be Json or XML. Both documents must be the same type.

Revision History

2.0.0.3 - Fixed bug that prevented the node from being run downstream from a ForEach.

Properties

ParentDocument

Type: Multiline Text Input
The parent XML document.

ChildDocument

Type: Multiline Text Input
The child XML document.

ParentNamespaces

Type: Multiline Text Input
A list of namespace prefixes and namespaces (one per line) that are referenced in the parent XPath properties. See remarks for further details.

ParentPath

Type: String Input
The Path to the containing node for a single record in parent document.

ParentKeyPath

Type: String Input
The Path of the key element. This should be a child of the ParentPath, and should be an absolute path.

ChildNamespaces

Type: Multiline Text Input
Only used when the document type is XML.
A list of namespace prefixes and namespaces (one per line) that are referenced in the child XPath properties. See remarks for further details.

ChildPath

Type: String Input
The Path to the containing node for a single record in child document.

ChildKeyPath

Type: String Input
The Path of the key element. This should be a child of the ChildPath, and should be an absolute path.

MergedDocument

Type: Multiline Text Output
The merged document.

UnmappedItems

Type: Multiline Text Output
An array of all the records in the child document that was not mapped to a record in the parent document.

Remarks

Enables two datasets to be merged together based on a key field. This Node is useful when its necessary to enrich a primary dataset with additional information before doing further processing on it.

For example, if a dataset of invoices needs to be extended to include more information on the customers for the invoices, the customer record matching the customer on each invoice can be merged into the invoices dataset (see example below for this specific use case).

Note that this Node handles merge only and does not handle transformation. It's generally recommended that it be used as a precursor to QuickMap or XSL Transform.

Specifying Namespaces

The namespaces properties should contain a prefix and namespace in the format prefix:namespace one per line. The prefixes can then be referenced in the relevant Path properties.

For example, declaring a namespace ns:http://uri.com/path enables evaluation of the Path invoices/ns:invoice.

Examples

See Sample Workflow for an example