The Union transform combines the rows from two tables that have matching columns.
If the two inputs come from the same data connector, and the data provider supports union statements, the union will be automatically included as part of the query sent to the database, unless the transform is preceded by another that must be executed by Dundas BI.
The Union transform requires at least two inputs, and more than two are supported.
For example, the input could be data coming from two different Excel sheets, which have corresponding columns:
- Input Table 1: Sales_2013
- Input table 2: Sales_2014
In the Union configuration dialog, there are separate settings for each input.
For the first input, select which elements should be included in this transform. You can exclude elements that don't have matching columns in the other inputs.
Change the Inputs dropdown to select each other input, and click to expand each column's Mapping Element. Ensure each column is mapped correctly to the matching column in the other input. This is especially important if the column names did not match.
Extra elements that don't have matching columns in the other inputs can be un-checked to exclude them.
There is an Include Duplicate Rows option, which applies to all inputs.
The output combines the rows from all of the inputs.
The figure below illustrates the output in our example:
The figure below illustrates the output when the duplicate rows are excluded: