Merge Data

From PresenceWiki
Revision as of 08:53, 21 August 2015 by Rob (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Merge Data

The Merge Data Node is responsible for merging together different Data Tables. These may come from separate execution paths or from one iterative execution path (see image below).

Sequential merge.png

Iterative merge.png

A typical use of the Merge Data node is to reconcile a Data Table that has previously been split up using the Dataset Splitter node.

How it works

The Merge Data Node operates by blocking Task execution until all incoming execution paths have completed, whether these are in the form of separate paths or an iterative path, or a combination of the two. When all paths have completed the node creates a new Data Table which is a combination of any Data Tables that were passed to it in the Presence Context.

Merge Strategies

Three strategy options are available for merging Data Tables, and these are presented with the Merge Data options dialog:

Vertical Append

Data Tables are stacked vertically. Each incoming Data Table is joined to the bottom of previous Data Table(s). If the incoming Data Table contains columns that are not present in the existing Data Tables, a new Column is created and its value is set to Null for all records where it is not present. The number of total resulting rows is equal to the number of rows in each incoming Data Table.


Merge verticalmerge.png

Horizontal Append

Appends the Data Tables horizontally. Each row of the first Data Table will be matched with the same row from the incoming Data Table. The number of rows will be equal to the number of rows in the largest Data Table. If both Tables contain the same column name the original value will be preserved.

If the number of rows are not equal between tables, null values will be used to fill in blank space.


Merge horizontalmerge.png

Cross Merge

For each row in the original table, each row of the incoming data table is joined to that row, with new columns being appended to the right. If the column name already exists and the value is not NULL the value is left unchanged. Otherwise the NULL is replaced with the new value.

The number of total resulting rows is equal to the number of rows in the first set multiplied by the number of rows in the second set, and so on for the forth, fifth etc.


Merge crossmerge.png

Applying Rules

To apply Rules to the Merge Data Node, make sure the "Add Rule" checkbox is selected in the Merge Data dialog and click the button next to it. If Rules are present each row will be evaluated to ensure it meets the specified conditions before being included in the resulting (merged) Data Table.



Data Filter | Require Columns | Append Data Column | Multiple Column Appender

Drop Column | Drop Row(s) | Calculate Column Aggregate | Dataset Splitter | Merge Data

Create Data Table | Clear Data Table | Sort Data Table | Drop Duplicate Rows | Store Data Table | Retrieve Data Table


Task Elements > Data Table Nodes > Merge Data