pbPassingBI
/
Transformation & aggregation intermediate 6 min

The GroupBy node

Grouping and aggregating — and the column naming that surprises people.

What you'll be able to do
  • Group and aggregate
  • Choose aggregation methods
  • Control the output column names

Two tabs

Groups — the columns defining the grain. Manual Aggregation — the columns to aggregate, each with a method.

Groups:      Region
Aggregation: Revenue -> Sum
             OrderID -> Count
             CustomerID -> Unique count

That is SELECT region, SUM(revenue), COUNT(order_id), COUNT(DISTINCT customer_id) ... GROUP BY region.

Ungrouped columns disappear

Any column neither grouped nor aggregated is dropped from the output, without warning.

If a descriptive column needs to survive, add it to the aggregation with First — safe when it is functionally dependent on the group key.

Column naming

The default naming breaks downstream nodes

GroupBy renames aggregated columns to Sum(Revenue) by default — including the brackets.

Downstream nodes referencing Revenue then fail. Set the column naming option to Keep original name(s) unless you specifically want the aggregation visible in the name.

Pattern and type aggregation

Beyond manual selection, the node offers Pattern Based Aggregation (regex on column names) and Type Based Aggregation (all numeric columns get Sum, say).

Both survive schema changes where a manual list does not — worth using when the incoming columns vary.

Related nodes

Pivoting groups and pivots in one node. Ungroup expands list cells back into rows. Moving Aggregation gives running totals and moving averages over ordered rows — the window-function equivalent, and it needs a Sorter before it.

Key points
  • Columns neither grouped nor aggregated are silently dropped
  • Set naming to Keep original names or downstream references break
  • Moving Aggregation is the window-function equivalent and needs sorting first
Check yourself