Node reference
Merge
Join branches or collect item results
Merge defaults to Join branches, combining one value from each incoming connection. Choose Collect items to gather repeated executions from one Read file or Iterate source into an array.
Try it step by step
- For Join branches, connect paths that all produce a value. Merge waits for one value from each incoming connection.
- For Collect items, connect the processed item results and one direct Read file or Iterate done output to the same Merge input.
- Connect the resulting array to Code to sort, filter, group, or deduplicate it; to Write file for one batch; or to Iterate to split it into executions again.
What to expect
Join branches emits once per matched set of paths. Collect items emits once per source execution, after all item paths finish; an empty or fully filtered source emits []. The done signal is not included in the result.
Things to check
- Join can execute repeatedly: branches split from the same item stay paired even when items complete out of order. Feed each joined result into Collect items, with the source done output connected, to gather the full batch. Turn off Flatten arrays on that collector to preserve each joined group.
- Join does not match independent loops by row number or data ID. Collect each loop first, then join its completed array.
- If you already have an array, pass it directly to Code or Write file. Write file can also append each execution without a collector; collection is useful when later work needs the complete processed batch.
- Join branches needs every incoming path. Collect items can gather either or both If routes within its source iteration.
- Collections use arrival order. Sequential preserves item order, but branches within an item may still overlap. Sort explicitly when branch order matters.
- Collection accepts an item without waiting for the source done signal, so sequential iteration can advance. Put final work needing the complete array after Merge.
- Arrays are flattened by one level by default. Turn off Flatten arrays in More options to preserve nested arrays or batches.
- Connect one source done output directly to each collector. To combine separate sources, collect each one and join their arrays with another Merge, or collect beneath an outer Iterate.
- To save a collected batch, connect Write file after Merge and Save file after Write.
Keep learning
Parameters
| Setting | Default | What it does |
|---|---|---|
| Mode | branches | Join waits for each incoming branch. Collect gathers item results until the connected Read file or Iterate done output arrives. |
| Flatten arrays | true | Add each incoming array item to the result. Turn off to keep each array as one value. |
| Node name | (empty) | Custom display name. References and connections keep their existing identifiers. |
Mode: Choices: Join branches (branches), Collect items (collect).
Flatten arrays: Available under More options.
Node name: Double-brace expressions are not resolved in this field.
Inputs
| Port | Value | Description |
|---|---|---|
in | any | Incoming values. In Collect items mode, also connect Read file or Iterate done here. |
Outputs
| Port | Value | Description |
|---|---|---|
out | array | Combined branch values or the completed collection of item results. |