Tumbling windows

Tumbling windows are intervals defined to group events for aggregation. Tumbling windows are contiguous and of equal duration. They help with calculations on simple, regular intervals of time.

The following screenshot shows tumbling windows overlaid on an event stream:

The following example shows average speed and count of cars per city for every ten seconds. A tumbling window of contiguous ten-second intervals is used to group the events for aggregations.

The following example query applies TumblingWindow to apply calculations to 10-second intervals:

select System.Timestamp as WindowEndTimestamp, ehinput.city,    avg(ehinput.speed) ...

Get Stream Analytics with Microsoft Azure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.