Using Unions to Combine Data
1. Concept
A union is way to connect multiple tables from a single data source.
It combines rows from two or more tables to lengthen the scope of your data.
2. Union Your Data
The tables that you combine using a union must have the same structure:
- same number of fields
- related fields must have matching field names and data types
After the data union,
- all the rows are included in the union, even the duplicate values
- two new columns(Sheet & Table Name) will be automatically generated
3. Create a Union Manually
Two ways to create a union:
-
drag and drop
- clicking and dragging the first sheet to the empty canvas
- click and drag the second sheet underneath the first sheet until the [Union] box appears
- drop the second sheet when the box changes to a solid orange color
-
Use [New Union] option
-
double-click the New Union option
-
Specific (manual):
create unions manually by selecting specific files that are imported in the Data Source page.
-
Wildcard (automatic):
created automatically by searching for files through a directory
-
4. Merge Mismatched Fields
For duplicate fields with mismatched field names but the same values, we can combine them by using Merge Mismatched Fields
Process:
- Go to the [Data Source] page
- Select the fields we want to merge
- From the drop-down menu, click [Merge Mismatched Fields]
- Rename the merged field