DEV Community

Paulet Wairagu
Paulet Wairagu

Posted on

QN : Window Functions in stream analytics

  • Stream processing data is aggregated into temporal views/windows eg average rainfall per hour

Temporal Window functions:

  1. Tumbling
  • These functions segment data into a contiguous series of fixed size , none overlapping time segments and operate against them. eg

Here ,the tumbling window finds the maximum value in each one minute window.
Windowing functions are applied using GROUP BY Clause

  1. Hopping

  • Are like tumbling window functions that can overlap

  • These functions model scheduled overlapping windows , jumping forward in time by a fiexed period.

  • Events can belong to more than one window

  • Three parameters must be defined: time, window size, hop size

  1. Sliding
  • This function generates events for points in time when contents of the window change.

  • There is a limit on number of windows to be considered.

  • Events can belong to more than one window

  1. Session
  • Window function cluster together events that arrive at similar times, filtering out no data.

  • 3 main parameters: timeout, maximum, partitioning

  • First event starts a window.

  1. Snapshot
  • Groups events by identical timestamp values

  • No window is defined

Top comments (0)