The Merge Rows (UNION) component stacks two tables vertically into a single output table. It supports both UNION (removes duplicate rows) and UNION ALL (keeps all rows, including duplicates), controlled by the Remove Duplicates parameter.
Both input tables must have the same number of columns and matching data types.
Note
Configure this component only in the Machine Learning Platform for AI (PAI) console.
Configure the component
In Machine Learning Designer, open your pipeline and add a Merge Rows (UNION) component. Connect it to the upstream nodes, then click the component to configure the following parameters.
| Parameter | Description |
|---|---|
| Left Table Output Column | Columns to include from the left input table. The number of selected columns and their data types must match the right table selection. |
| Right Table Output Column | Columns to include from the right input table. Must match the left table selection in count and data type. |
| WHERE Clause for Left Table | Filters rows from the left table before merging. Uses SQL-style syntax. Example: age>40. |
| WHERE Clause for Right Table | Filters rows from the right table before merging. Uses the same syntax as the left table WHERE clause. |
| Remove Duplicates | Controls whether duplicate rows are removed from the output. Selected by default (equivalent to UNION). Clear this check box to keep all rows, including duplicates (equivalent to UNION ALL). |
WHERE clause operators
The WHERE clause supports the following comparison operators:
| Operator | Example |
|---|---|
= | age=40 |
!= | age!=40 |
> | age>40 |
< | age<40 |
>= | age>=40 |
<= | age<=40 |
like | name like 'Ali%' |
rlike | name rlike '^Ali.*' |