Stack Rows
Concatenate rows from two or more inputs into a single output. In union mode the output schema is the union of all input columns and missing fields are filled with null; in strict mode every input must already share the same columns. Use it to combine monthly exports, append archived rows to live data, or merge per-region files before further processing.
How it works
Section titled “How it works”Stack Rows is a multi-input batch transform: it accepts an arbitrary number of input streams and emits one combined output. Inputs are read fully into memory and concatenated in input order (input 1’s rows first, then input 2’s rows, etc.); within each input, original row order is preserved.
In union mode, the executor scans every row across every input to build the union of column names, then normalizes each row to that full column set with missing keys set to null. This means the output rows always have identical shape, even if the source files had different columns.
In union_strict mode, no normalization happens — rows are concatenated as-is. The schema check happens at design time via getOutputSchema; if you connect inputs with mismatched columns the flow editor surfaces an error before execution.
Input: Two or more tabular data connections. Output: All rows from all inputs, in input order, with the union (or strict) column set.
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
mode | "union" | "union_strict" | "union" | "union" fills missing columns with null. "union_strict" rejects schema mismatches at design time. |
Examples
Section titled “Examples”Combine two monthly exports with the same columns
Section titled “Combine two monthly exports with the same columns”You have January and February sales exports with identical columns and want a single combined dataset.
Input 1 (January):
| order_id | customer | amount |
|---|---|---|
| 1001 | Acme Corp | 250 |
| 1002 | Beta Inc | 750 |
Input 2 (February):
| order_id | customer | amount |
|---|---|---|
| 1003 | Gamma LLC | 1100 |
| 1004 | Delta Co | 500 |
Configuration: mode: union (or union_strict — both produce identical output when schemas match).
After:
| order_id | customer | amount |
|---|---|---|
| 1001 | Acme Corp | 250 |
| 1002 | Beta Inc | 750 |
| 1003 | Gamma LLC | 1100 |
| 1004 | Delta Co | 500 |
Stack inputs with different columns (union mode fills nulls)
Section titled “Stack inputs with different columns (union mode fills nulls)”The 2025 export added a region column that wasn’t in the 2024 export. You want both years stacked.
Input 1 (2024):
| order_id | customer | amount |
|---|---|---|
| 901 | Acme Corp | 200 |
Input 2 (2025):
| order_id | customer | amount | region |
|---|---|---|---|
| 1001 | Beta Inc | 800 | EU |
Configuration: mode: union.
After:
| order_id | customer | amount | region |
|---|---|---|---|
| 901 | Acme Corp | 200 | |
| 1001 | Beta Inc | 800 | EU |
The first row’s region is null because the 2024 input did not have that column.
Tips and Edge Cases
Section titled “Tips and Edge Cases”- Union mode rebuilds every row. The executor walks every row across every input twice — once to discover column names, once to normalize — so memory and CPU scale with total row count, not just unique-column count. For very large stacks where you know the schemas already match, prefer
union_strictto skip the second pass. Seeapps/web/src/transforms/stack-rows/logic.ts:45-65. - Missing columns are
null, not empty string. Filter Rows’is emptyoperator matches both, but downstreamChange Typerules onnullskip the parser and writenull; on""thestringtarget writes"". The distinction matters when exporting to CSV where the two render differently. Seeapps/web/src/transforms/stack-rows/logic.ts:53-58. - Strict mode is enforced at design time, not at run time.
union_strictdoes not error if rows have unexpected keys — it concatenates them as-is and downstream sees a ragged schema. The schema-mismatch error comes fromgetOutputSchemain the flow editor. Seeapps/web/src/transforms/stack-rows/logic.ts:41-43andapps/web/src/transforms/stack-rows/logic.ts:78-87.
Related Transforms
Section titled “Related Transforms”- Lookup — join rows by a key column instead of stacking them vertically.
- Group By — collapse stacked rows into per-key aggregates after combining.
- Filter Rows — remove unwanted rows from a stacked dataset.