Streaming and Change Data Capture · Lesson 4 of 5 · 14 min

Windows and live metrics

Count events in time windows, and measure how long things take.

Streaming metrics are counted in windows. A tumbling window cuts time into fixed, non-overlapping blocks (every hour, every day). A sliding window looks at the last N minutes, updated continuously. In SQL, date_trunc or time_bucket gives you tumbling windows:

Practice

← Previous: Out-of-order and late events