Concatenate
Stack rows from two datasets into one (SQL UNION ALL).
When to use this¶
- You have two files (or two upstream nodes) with the same shape and you want one combined dataset, for example monthly sales from two regions, or two years of demand history
What you need¶
- Two upstream data sources wired into the Concatenate node's two inputs
- The two datasets should share the columns you care about. Concatenate aligns on column names
How it works¶
Concatenate has no parameters. It takes all rows from input 1, then all rows from input 2, and emits them as a single dataset. Columns are aligned by name (case-sensitive).
Columns that exist in only one input are absent from rows of the other input. They are not filled in with blanks.
What you get¶
One dataset with all rows from both inputs, in input-1-then-input-2 order. Duplicates are preserved (UNION ALL, not UNION).
Chained concatenation¶
For three or more datasets, chain Concatenate nodes. Each Concatenate's output becomes the first input of the next:
flowchart LR
n1["Import Data (A)"] --> n2["Concatenate 1"]
n2 --> n3["Concatenate 2"]
n3 --> n4["Create Scenario"]
n5["Import Data (B)"] --> n2
n6["Import Data (C)"] --> n3
Workflow wiring¶
flowchart LR
n1["Import Data (sales_2023.csv)"] --> n2["Concatenate"]
n2 --> n3["Aggregate"]
n3 --> n4["Map Demand Policy"]
n4 --> n5["Create Scenario"]
n6["Import Data (sales_2024.csv)"] --> n2
Common mistakes¶
- Using a Script to stack rows in Python. Use Concatenate first; it needs no code and is visible in the workflow
- Wiring only one input. Concatenate needs exactly two upstream connections
- Expecting deduplication. Concatenate stacks every row. Add a downstream Filter or Aggregate if you need to dedupe
- Trying to wire three inputs into one Concatenate. Chain Concatenate nodes instead (see above)