Skip to main content
Version: Next
tumbling_windowINPUTBUFFERPROCESSOROUTPUT

Tumbling Window

The Tumbling Window buffer groups messages into fixed-size, non-overlapping time windows. Every configured interval, all messages accumulated within the current window are emitted together as a single batch; each message belongs to exactly one window. A legacy join option exists, but the stream compiler rejects window buffers that declare it (see the warning below).

Configuration​

FieldTypeRequiredDefaultDescription
typestringyes—tumbling_window
intervaldurationyes—Fixed duration of each window. When it elapses, all accumulated messages are emitted. Examples: 1ms, 1s, 1m, 1h.
joinobjectno—Legacy SQL join configuration; rejected by the stream compiler (see warning below).
Legacy join — rejected by the stream compiler

Declaring join on a tumbling_window buffer fails compilation with legacy window buffers with 'join' cannot compile. Stream-stream join is not supported in Stream configs; run a Job with the DAG join operator instead (see Stream-stream join), or use the SQL processor's per-batch joins against temporary tables.

join​

FieldTypeRequiredDefaultDescription
querystringyes—SQL query joining batch data from different input sources.
value_fieldstringno—Name of the binary field holding the message payload. Defaults to the engine default binary value field.
codecobjectyes—Codec used to decode message batches before joining.
thread_numintegerno—Number of partitions each decoded batch is split into before the join (decode concurrency itself is fixed at the CPU count, not this value).

The codec field is a CodecConfig object: a type string selecting the codec plus any codec-specific fields.

Examples​

Basic Configuration​

buffer:
type: "tumbling_window"
interval: "1s"

With Join Configuration​

buffer:
type: "tumbling_window"
interval: "5s"
join:
query: "SELECT a.id, a.name, b.value FROM input1 a JOIN input2 b ON a.id = b.id"
codec:
type: "json"