Union Join

The Union node is used to create a union between 2 or more tables, adding the union to the database schema. The Union node can be connected to any Select (excluding Multi Select), Preparation, and Column Operation nodes. The Union function combines rows (vertically) from multiple tables, appending the rows in the second table to the first. Each table should have the same number of columns in it.

The Union node can be used to combine rows from tables from the data source, or to combine data source tables with new tables generated by data cleansing and preparation functions. For example, both the Date Range and Summarize functions generate new tables; these can then be joined to the original table from the data source.

A typical use case for a union is if you have two (or more) lists, consisting of the same column structure but different values, and you want to combine those lists into one. For example, you may have two lists of sales people and the number of items they sold from two different stores. You can combine the rows from both tables using the Union function to produce one master list.

Create a Union or Stack Join (vertical)

  1. Connect the Union node to the tables to be combined in the order in which they should be appended to the new table.

    The rows of each table are appended in the order in which the tables are connected to the Union node. The given tables should have the same number of columns, and the same data type.

  2. With the Union node selected, go to the Properties panel to configure the union:

    • Resulting Table Name: Name the new table.

    • Union All: Clear this checkbox to eliminate any duplicate rows.

    • Add Source Table Name Column: Select this checkbox to add a column that lists the name of the source column for each row.