Skip to main content
Version: 2.0
Aggregator Node parameters

Aggregator node configuration

Aggregator Node

Overview

The Aggregator Node collects numeric values from successive pipeline executions and computes statistics—average, minimum, maximum, sum, or count—once a configurable window of values has been reached. While the window is filling, downstream nodes are skipped; when the window is full, the node emits the computed results and resets for the next window.

Because the node stores only running totals (not every individual value), it is memory-efficient even for large windows and well suited for sensor roll-ups, quality summaries, and throughput metrics.


Core Functionality

What It Does

1. Windowed Aggregation The node accumulates values until Window Size executions have been processed. On the final execution of each window, it flushes the computed statistics downstream and starts a new window.

2. Incremental Statistics Sum, min, and max are updated incrementally as each value arrives—only four numbers (count, sum, min, max) are stored in state regardless of window size. Average is derived from sum / count at flush time.

3. Flexible Value Extraction The Value Field parameter supports Maestro expressions ({{ $node["Read Sensor"].temperature }}), dot-notation paths (sensor.reading), and direct field names. The extracted value is converted to a number before aggregation.

4. Downstream Gating Before the window is full, the node completes with a buffering status and skips downstream execution. Only when the window fills does the output propagate to connected nodes, preventing partial-window results from triggering downstream logic.

5. Persistent State Accumulated statistics survive pipeline restarts. Each pipeline + node combination maintains an independent window, so multiple Aggregator nodes in the same pipeline track separate data.


Configuration Reference

Parameters

ParameterTypeDefaultRequiredConstraintsDescription
Value FieldstringYesMust resolve to a numeric valueExpression or dot-notation path to the numeric field to aggregate (e.g., {{ $node["Read Sensor"].temperature }}).
Window Sizenumber100Yes1--10,000Number of values to collect before flushing aggregated results downstream.
Operationsmulti-select["avg"]YesAt least oneStatistics to compute: avg, min, max, sum, count.

Value Field Examples

  • {{ $node["Read Sensor"].temperature }} — field from a named upstream node
  • {{ $node["Read Sensor"].data.reading }} — nested field from an upstream node
  • temperature — top-level field from the node's direct input
  • sensor.reading — nested field via dot notation from the node's direct input

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 is set to 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.

Input / Output

Input

The Aggregator Node expects a JSON object containing the field referenced by Value Field. The field value must be convertible to a number (integer or float).

Output — Buffering (window not yet full)

While values are still accumulating, downstream nodes are skipped. The node's own output is:

{
"count": 3,
"windowSize": 10,
"flushed": false
}

Output — Flushed (window complete)

When the window fills, the node emits the computed statistics and allows downstream execution:

{
"count": 10,
"windowSize": 10,
"flushed": true,
"avg": 24.5,
"min": 18.2,
"max": 31.7,
"sum": 245.0
}

Only the operations selected in the configuration appear in the output.

FieldTypePresentDescription
countnumberAlwaysNumber of values in this window.
windowSizenumberAlwaysConfigured window size.
flushedbooleanAlwaystrue when the window is complete and results propagate downstream.
avgnumberIf selectedArithmetic mean of all values in the window.
minnumberIf selectedLowest value in the window.
maxnumberIf selectedHighest value in the window.
sumnumberIf selectedSum of all values in the window.

Manual Actions

ActionDescription
View StatsReturn the current accumulated statistics and window progress without modifying state.
ResetClear all accumulated state and start a fresh window.

Usage Examples

Example 1: Average Temperature over 10 Readings

FieldValue
Value Field{{ $node["Read Sensor"].temperature }}
Window Size10
Operationsavg, min, max

Every sensor reading increments the window. After 10 readings, the node emits the average, minimum, and maximum temperatures downstream—useful for feeding a dashboard or triggering an alert if the average exceeds a threshold.

Example 2: Hourly Production Sum

FieldValue
Value Field{{ $node["PLC Reader"].unitsProduced }}
Window Size60
Operationssum, count

If the pipeline fires once per minute, a window of 60 produces an hourly total. Downstream nodes receive the cumulative sum for reporting or UNS publishing.

Example 3: Quality Metric Roll-Up from Upstream Node

FieldValue
Value Field{{ $node["Measure"].thickness }}
Window Size100
Operationsavg, min, max, sum, count

References the thickness field from an upstream node named "Measure". After 100 measurements, all five statistics are emitted for a comprehensive quality summary.


Best Practices
  • Choose the smallest set of operations you need. The output stays clean and downstream expressions are simpler.
  • Pair with a Counter or Condition node if you need both per-event and windowed logic in the same pipeline.
  • Use View Stats during development to check accumulation progress without waiting for a full window flush.
note

Downstream nodes only execute when the window is complete (flushed: true). If you need every execution to propagate, use the Set or JavaScript node with manual aggregation logic instead.