Aggregator
Category: Control
Node id: aggregator
Performs aggregation operations on arrays: count, sum, average, min, max, group, distinct
What it does
- Seven aggregation types: count, sum, average, min, max, group, distinct
- Group-by with per-group counts and unique value tracking
- Min/max with full item retrieval (not just the value)
- Distinct value extraction with deduplication
Use cases
- Summarize patient encounter counts by department
- Calculate average lab values across a cohort
- Group FHIR resources by type for batch processing
Runtime
- Performance tier:
fast
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
data | json | Yes | Array of objects to aggregate |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Aggregation result: count, sum, average, min/max with item, groups, or distinct values depending on aggregation_type |
success | boolean | No | Whether the aggregation completed without error |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Aggregation Type | aggregation_type | enum | No | count | count, sum, average, avg, min, max, group, distinct | Type of aggregation to perform |
| Field | field | string | No | Field to aggregate (required for sum, average, min, max, distinct) | ||
| Group By | group_by | string | No | Field to group by (required for group aggregation) |
Errors
| Code | Description |
|---|---|
MISSING_FIELD | Field config is required for sum, average, min, max, and distinct aggregations |
INVALID_DATA | Input data is not an array of objects |
UNSUPPORTED_AGGREGATION | The specified aggregation_type is not recognized |
Runtime notes
- The result shape changes entirely based on aggregation_type — count returns {count}, sum returns {sum,field,count}, group returns {groups,group_counts,...}, etc.
- For min/max, result includes min_item/max_item containing the FULL original object, not just the field value.
- Items with missing or non-numeric field values are silently skipped in sum/average/min/max — check result.count to see how many were actually aggregated.
- For an empty input array, the node returns {count:0} regardless of aggregation_type.
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
Etwas unklar? Senden Sie Feedback zur Dokumentation per E-Mail..