MergeTable

Estimated reading: 3 minutes

The Merge Datatable activity allows users to merge two datatable variables into a single output datatable. This activity supports schema-based control over how the merge handles differences in table structure and duplicate data.

Purpose
The purpose of the Merge Datatable activity is to:
       1. Combine data from two datatables into one.
       2. Handle schema differences between datatables.
       3. Control how duplicate and mismatched data is processed

Properties

INPUT

MissingSchemaAction*: Specifies the action to perform when there are schema differences while merging the datatables.
Select one of the following options from the drop-down list:
 a. Add: Merges all data from both datatables, even if the number of columns differs. Any missing columns are added automatically.
 b. Error: Merges the datatables only if their schemas match. If any schema mismatch is detected, the activity throws an error.
 c. Ignore: Ignores non-common columns and merges only the data that exists in both datatables.
 d. AddWithKey: Merges the datatables based on a validated primary key to avoid duplicate rows.

Table1*: Represents the Source Datatable. Provide the input datatable variable that contains the data to be merged into Table2.
Table2*: Represents the Destination Datatable. Provide the input datatable variable into which Table1 will be merged.
Note: Table1 and Table2 fields accept only the Datatable data type.

MISC

DisplayName: Displays the name of the activity. It can also customize the activity name to helps in troubleshooting.
SkipOnError: Determines whether the workflow should continue execution if the activity encounters an error. This property accepts Boolean values.
True – Continues execution to the next activity
False – Stops the workflow if an error occurs
None – Defaults to False behavior
Version: It specifies the version of the Datatable automation feature being used.

OUTPUT

Table: Returns the merged result as a Datatable.
Result: Indicates the execution status of the activity. It returns the values in Boolean format.
True – The activity executed successfully
False – The activity failed due to an error

* Represents mandatory fields required to execute the workflow.

How It Works

1. Table1 is treated as the source datatable. 
2. Table2 is treated as the destination datatable.
3. The merge operation is performed based on the selected MissingSchemaAction.
4. The final merged data is returned as a single output datatable.

Share this Doc

MergeTable

Or copy link

CONTENTS