Aggregate Session
Description
note
This page describes the behavior specific to aggregations in the session window. For concepts and configuration common to all time-window aggregations, see Aggregations in time windows.
A session window groups events that belong to one continuous period of activity. Unlike sliding and tumbling windows, a session window does not have a fixed length.
A separate session is maintained for each Group by value.
A session closes when either:
End session conditionevaluates totrue, or- the time since the last event for that
Group byvalue exceedsSession timeout.

For simplicity, all events share the same Group by value ("purple")
The computed aggregations can be emitted:
On each event- enrich the incoming event with the current aggregate. No additional aggregate event is emitted when the session ends.After session end- incoming events do not continue downstream; when the session closes, a new aggregate event is emitted. Variables belonging to the original events, such as #input and #inputMeta, are therefore unavailable downstream.
Parameters and configuration
Parameters common to all windows are described here.
| Parameter | Description |
|---|---|
End session condition | Expression evaluated for incoming events. When it evaluates to true, the current session closes. Set it to false if sessions should close only because of inactivity. |
Session timeout | Amount of inactivity after which a session closes. The inactivity period is measured separately for each Group by value. |
Emit when | Determines whether incoming events are enriched while the session is active or a new aggregate event is emitted after the session closes. |