Skip to main content
Version: 2.0-beta.1
Group By node configuration

Group By Node

Group By Node

Overview

The Group By Node takes an array of items and builds a hierarchical object by grouping records on one or more fields.
It is useful when you need to pivot or aggregate data by equipment, line, product, or any other dimension before sending it to dashboards, reports, or downstream logic.

The node:

  • Accepts an array (either directly from $input or via an expression).
  • Groups data by an ordered list of fields (supporting dot notation).
  • Produces a nested object where each level corresponds to a grouping field.
  • Optionally removes grouping keys from the final items for cleaner output.

Configuration Reference

Group By node parameters

Parameters Tab

Grouping Configuration

Group By node settings

Settings Tab

Settings Configuration

Parameters (Dynamic Data)

FieldTypeDefaultDescription
Group By Fieldsarray<string>[]Ordered list of field names used for hierarchical grouping. At least one field is required.
Input Fieldstring"" (meaning {{$input}})Expression that must evaluate to an array to group.
Support Dot NotationbooleantrueEnables dot-notation lookups such as user.department.
Missing Field Behaviorstring"empty"How to handle missing grouping fields: "empty", "null", or "skip".
Include Grouping FieldsbooleanfalseInclude grouping fields in the output items (when false, they are removed).

Grouping Field Examples

  • fieldName
  • user.department (with dot notation enabled)
  • equipment.line

Input Field Examples

  • {{$input}} – Use the entire input as the array.
  • {{$input.data}} – Use data property of the input.
  • {{$inputs["Aggregate"].results}} – Use the results from a specific upstream node.

Settings (Static Configuration)

FieldTypeDefaultDescription
Retry on FailbooleanfalseRetry when grouping fails due to transient issues.
On Errorstring"stopPipeline""stopPipeline" fails the branch; "continueExecution" returns an empty object instead of failing.
Notesstring""Internal documentation about the grouping strategy.
Display Note in PipelinebooleanfalseShows notes directly on the canvas near the node.

Usage Examples

Example 1: Group Production Events by Line

Input array:

[
{ "line": "Line-A", "event": "start", "timestamp": 1700000000000 },
{ "line": "Line-A", "event": "stop", "timestamp": 1700000100000 },
{ "line": "Line-B", "event": "start", "timestamp": 1700000200000 }
]

Configuration:

FieldValue
Group By Fields["line"]
Input Field{{$input}}
Support Dot Notationfalse
Missing Field Behavior"empty"
Include Grouping Fieldsfalse

Output:

{
"Line-A": [
{ "event": "start", "timestamp": 1700000000000 },
{ "event": "stop", "timestamp": 1700000100000 }
],
"Line-B": [
{ "event": "start", "timestamp": 1700000200000 }
]
}

Example 2: Group by Line and Station with Dot Notation

Input array:

[
{ "meta": { "line": "Line-A", "station": "Station-1" }, "value": 10 },
{ "meta": { "line": "Line-A", "station": "Station-1" }, "value": 12 },
{ "meta": { "line": "Line-A", "station": "Station-2" }, "value": 9 }
]

Configuration:

FieldValue
Group By Fields["meta.line", "meta.station"]
Input Field{{$input}}
Support Dot Notationtrue
Missing Field Behavior"skip"
Include Grouping Fieldsfalse

Output:

{
"Line-A": {
"Station-1": [
{ "value": 10 },
{ "value": 12 }
],
"Station-2": [
{ "value": 9 }
]
}
}

Example 3: Using a Nested Input Field

Upstream node produces:

{
"data": [
{ "product": "Widget-A", "status": "pass" },
{ "product": "Widget-A", "status": "fail" },
{ "product": "Widget-B", "status": "pass" }
]
}

Configuration:

FieldValue
Group By Fields["product", "status"]
Input Field{{$input.data}}
Support Dot Notationfalse
Missing Field Behavior"empty"
Include Grouping Fieldstrue

Result groups the nested data array by product and status while keeping those fields in each leaf item.


When to Use Group By

Use the Group By node when:

  • You need to pivot or aggregate arrays into hierarchical structures for dashboards or reports.
  • You want a declarative configuration for grouping (field list, dot notation, missing-field strategy) instead of custom scripting.
  • You are preparing data for downstream nodes that expect structured groupings (e.g., summary functions, Smart Connector calls, or UNS publishing).