Activity program nameAbout the "Merge Data Table" Activity
The "Merge Data Table" activity allows merging two data tables. Below is an explanation of its features and usage.
TABLE OF CONTENTS
- Activity program name
- Description
- Properties
- Usage (when column definitions are the same)
- Usage (when column definitions differ)
1. Activity program name
RCA.Activities.Core.MergeDataTable
2. Description
For Studio version up to 2.0.2.0:
Quick access: Toolbox > Data Table > Merge Data TableFor Studio version 2.0.3.0 and later:
Quick access: Toolbox > Core > Data Table > Merge Data Table
This activity is used to merge two data tables.
Verified working version: 2.2.0.2
Note: Some labels and behavior may differ depending on the version.
3. Properties
Property item | Property name | Input field | Description |
---|---|---|---|
Options | Action when schema is missing | Dropdown | Selects how to handle merging when column definitions differ: Add: Includes all columns from both the source and destination tables. Ignore: Ignores columns that exist only in the source table. Error: Throws an error if the source and destination column definitions differ. AddWithKey: Includes all columns from both tables and adds primary key information to column definitions. |
Other | Public | Checkbox | If checked, logs data so it can be viewed through logs. Be cautious when handling sensitive information. |
Display Name | Enter value (String type) | Reflected as the activity name in the designer panel. | |
Input | Source | Enter value (DataTable type) | Specifies the source data table to be merged into the destination table. |
Destination | Enter value (DataTable type) | Specifies the destination data table where the source data will be merged. |
4. Usage (when column definitions are the same)
If the two data tables to be merged have the same column definitions, the source table’s data is appended to the destination table.
Example:
Create a data table using the Build Data Table activity, e.g., rateTable.
Add a second data table, e.g., addRateData, with the same column definitions.
Drag and drop the Merge Data Table activity into the designer panel.
In the properties, assign:
Source: addRateData (the table to be added).
Destination: rateTable (the table to which data will be added).
Run the process. Data from addRateData is appended to rateTable.
To verify the output of the merged data table:
Use the Output Data Table activity to convert the data table to a string.
Display the string in the output panel using the Write Line activity, or show it in a message box by iterating through rows using the For Each Row activity.
In the example: The merged content will appear in the rateTable variable, which combines the original rateTable data with the data from the source table addRateData.
5. Usage (when column definitions differ)
If the column definitions of the two data tables differ, the result of the merge depends on the Action when schema is missing property.
Examples:
Destination Table:
Source Table:
When the property value is "Add":
Includes all columns from both tables.
Missing values are filled with default values (if defined) or Null.
When the property value is "Ignore":
Ignores columns that exist only in the source table.
When the property value is "Error":
Throws an error if column definitions differ.
No data is merged in this case.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article