union¶
Type of operation: Join
Description¶
Create a new dataset consisting of the rows from the main input and each of the arguments.
Columns of the same name among different inputs must have the same type and will be merged into a single column in the output. Output columns which doesn’t exist in some input dataset will contain NULL values in rows coming from that dataset. Union is supported when the input datasets are all Table datasets, all Event datasets, or all Interval datasets. For union between Event or Interval datasets, the “Valid From” columns will all be merged into one output column, even if they have different names among the input datasets. For union between Interval datasets, the “Valid To” columns will all be merged into one output column, even if they have different names among the input datasets.
Usage¶
union @dataset_1, @dataset_2, ...
Argument |
Type |
Optional |
Repeatable |
Restrictions |
---|---|---|---|---|
@dataset |
dataset |
no |
yes |
dataset |
Accelerable¶
union is always accelerable if the input is accelerable. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.
Examples¶
union @second, @third
Create a new dataset that is the union of the main input dataset, and the @second and @third datasets, where names that are not shared are given NULL values in the opposite dataset.