Union creates an entity where two entities are added together to create one target —both entities must share the same field names, field counts, and data types .
Once entities are added to the canvas, the Union package is brought onto the canvas by double-clicking or dragging the icon.
When the square icon becomes a live controller on the canvas, connect entity 1 and entity 2 outputs to the Union control INPUT 1 and INPUT 2.
The example below shows a simple union where the data has been merged into the same fields. Union merges two identically structured entities (identical field names, number of fields, data type) into one table whereas Join combines columns in one result set based on a specified common field or fields between the entities. Use Swap function in Union controls to reverse INPUT 1 and INPUT 2 so that for the example 'Client_B' will connect to INPUT 1 and 'Client_A' will connect to INPUT 2.
The following shows sample data for both entities (Client_A, Client_B) and target entity sample data (Client_AB_Union)
Source and target entities—Union transformation
Union: Returned a target entity merging 'Client_A' (10 records) with 'Client_B' (10 records) to create 'Client_AB_Union' (20 records).