Concatenating Datasets

The Concatenate task in Rulex merges datasets by their columns, creating a single table with all the data.

There is no limit on the number of datasets you can concatenate.


Prerequisites

Additional tabs

The following additional tabs are provided:


Procedure

  1. Drag and drop the Concatenate task onto the stage.

  2. Connect the tasks that contain the datasets you want to merge to merge the Concatenate task. The order in which data is displayed in the final table depends on the order in which the import tasks are connected to the Concatenate task.

  3. Double click the Concatenate task.

  4. Select the Concatenation type (cattype) you require from the drop-down list:

    • inner (cattype = 0), where only attributes present in both tables are included in the final merged table

    • outer (cattype = 1), where all attributes are copied, filling in any missing values if necessary.

  5. Select how you want to match columns from the Match column by (byname) drop-down list, either by

    • position (byname = 0), where attributes in the same position are considered equal

    • name (byname = 1), where attributes with the same name are considered equal.

  6. Save and compute the task.


Example

The following examples are based on the Northwind dataset.

 

Scenario data can be found in the Datasets folder in your Rulex installation.

 

The original datasets consists of 415 and 830 records respectively.

 

 

The following steps were performed:

  1. We import the first dataset.

  2. We then import the second dataset. 

  3. A Concatenate task is added to create a single dataset.

  4. Use the Take a look functionality to check the concatenated data.

 

Procedure

Screenshot

Procedure

Screenshot

Import the first northwind_orders.set dataset, and compute the task.

To check its data, right-click the task and select Take a look.

The dataset contains 830 rows.

Repeat this process for the northwind_orders1.set dataset, which contains 415 rows.

Add a Concatenate task to the process, and select inner concatenation, matching attributes by name.

The save and compute the task.

To check the results, right-click the Concatenate task and select Take a look.

The resulting data table contains 1245 rows (830+415) obtained by concatenating the two datasets. 



 

northwind_orders.set was linked to the Concatenate task before northwind_orders1.set, so its data is displayed first in the final table.





Need to get in touch? https://www.rulex.ai/contact/ - Need a license renewal? https://rulex.atlassian.net/servicedesk/customer/user/login?destination=portals
© 2024 Rulex, Inc. All rights reserved.