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 datasource, or to combine datasource 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 datasource.

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 instance, you may have two lists of sales people and 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)

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.

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

Resulting Table Name: name the new table.

Union All: disable this option to eliminate duplicate rows.

Add Source Table Name Column: add a column that lists the name of the source column for each row.