Skip to main content
Version: 2.1
Merge Node interface

Merge node

Merge Node

Overview

The Merge Node consolidates payloads from two or more upstream branches into a single output. It always waits until every connected input delivers data, then merges the values according to the selected mode. Use it to fan-in parallel branches, stitch together batched results, or normalize multiple feeds for downstream processing.


Core Functionality

1. Wait-All Synchronization

  • A single logical input port accepts multiple edges.
  • Execution is forced into wait_all; the node fires only after every upstream branch completes.
  • Validation ensures at least two connections exist to prevent misconfigured merges.

2. Flexible Merge Modes

  • append (default) concatenates all incoming arrays or items in deterministic order (sources sorted alphabetically by node name).
  • combine zips items positionally, producing composite objects; unmatched positions can be preserved or dropped.
  • Other modes remain reserved for future releases and are rejected during validation if selected.

3. Auto-Normalization

  • Each inbound payload is coerced into an array before processing, regardless of original shape.
  • Mixed primitives and objects are supported—scalars become single-element arrays.
  • In combine mode, fields are prefixed with the source identifier (such as input_0_field) to avoid collisions.

4. Output Metadata

  • The merged output includes metadata keys like mergeMode, inputCount, itemCount, and processed_by="merge" for observability.
  • Downstream nodes receive a single array representing the merged content.

5. Standard Settings

  • Inherits core execution settings (Retry on Fail, On Error) and documentation options.
  • Input settings are fixed (syncMode = wait_all, waitTimeout = 30s) and not user-editable.

Configuration Reference

Parameters

ParameterTypeDefaultRequiredConstraintsDescription
Modeselect"object"Yesobject / append / combineByPosition / combineByKeyMerge strategy.
Key Fieldstring""If combineByKey--Field name to match items across inputs.
Failure Modeselect"error"Yeserror / empty / defaultWhat happens when a branch fails.
Default Valuestring (JSON)"{}"If failureMode=defaultValid JSONFallback value for failed branches.
Min Required Branchesnumber0No0--10Minimum branches that must succeed (0 = all required).

Settings

SettingOptionsDefaultDescription
Timeout (seconds)numberPipeline defaultMaximum execution time for this node (1--600).
Retry on TimeoutPipeline Default / Enabled / DisabledPipeline DefaultWhether to retry on timeout.
Retry on FailPipeline Default / Enabled / DisabledPipeline DefaultWhether to retry on failure. When Enabled, shows Advanced Retry Configuration.
On ErrorPipeline Default / Stop Pipeline / Continue ExecutionPipeline DefaultBehavior when node fails after all retries.

Advanced Retry Configuration (only visible when Retry on Fail = Enabled):

FieldTypeDefaultRangeDescription
Max Attemptsnumber31--10Maximum retry attempts.
Initial Delay (ms)number1000100--30,000Wait before first retry.
Max Delay (ms)number1200001,000--300,000Upper bound for backoff delay.
Multipliernumber2.01.0--5.0Exponential backoff multiplier.
Jitter Factornumber0.10--0.5Random jitter.

Usage Examples

Example 1: Append Finished Goods

FieldValue
ModeAppend
NotesCombine pallets from parallel pack lines.

Line A emits [{"palletId":"A-101"},{"palletId":"A-102"}] while Line B emits [{"palletId":"B-201"}]. The merge node delivers a single array with all pallets in alphabetical order by source, ready for warehouse dispatch.

Example 2: Combine Torque and Temperature Samples

FieldValue
ModeCombine
Combine ByBy Position
Keep Unmatched Itemstrue
NotesZip torque and temperature readings for SPC.

Torque stream → [{"torqueNm":32.4},{"torqueNm":31.8}]
Temperature stream → [{"tempC":145.2},{"tempC":146.1},{"tempC":144.7}]

Output:

- input_0_torqueNm: 32.4
input_1_tempC: 145.2
- input_0_torqueNm: 31.8
input_1_tempC: 146.1
- input_1_tempC: 144.7

Leaving Keep Unmatched Items at true preserves the final temperature sample even without a torque partner.

Example 3: Align Inspection Flags with Counts

FieldValue
Modecombine
Combine Byposition
Keep Unmatched Itemsfalse
On ErrorContinue Execution

Inspection node outputs [{"station":"Laser","flag":"OK"},{"station":"Vision","flag":"REVIEW"}]. A counter node provides [{"count":120},{"count":118}]. Combined results yield paired objects such as { input_0_station: "Laser", input_0_flag: "OK", input_1_count: 120 }. Because Keep Unmatched Items is false, any extra counts or flags are discarded to maintain alignment.