Skip to main content
This gem runs in .

Overview

The Union gem lets you combine records from different tables for cases such as merging customer databases or aggregating logs from multiple servers.
The gem has a corresponding interactive gem example. See Interactive gem examples to learn how to run sample pipelines for this and other gems.

Input and Output

To add additional input ports, click + next to Ports. All input tables must have identical schemas (matching column names and data types). If table columns have different orders or a different number of columns, use the UnionByName gem.

Parameters

Example

Let’s say you’re working with two tables: Table A and Table B.
  • Both tables contain order-related data.
  • Table A contains order information from customer 1, 2, and 3.
  • Table B contains order information from customer 1, 2, 3, and 4.
  • These tables contain some identical records (duplicates).

Table A

Table B

Result without duplicates

The following is the output table without duplicates.

Result with duplicates

The following is the output table when you select Preserve duplicate rows in the gem configuration.
Order 103 and 104 are duplicate records.