You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/stream-analytics/index.yml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
### YamlMime:Landing
2
2
3
3
title: Azure Stream Analytics documentation
4
-
summary: Azure Stream Analytics is a fully managed, real-time analytics service designed to help you analyze and process fast moving streams of data that can be used to get insights, build reports or trigger alerts and actions. Learn how to use Azure Stream Analytics with our quickstarts, tutorials, and samples.
4
+
summary: Azure Stream Analytics is a fully managed, real-time analytics service designed to help you analyze and process fast moving streams of data that can be used to get insights, build reports, or trigger alerts and actions. Learn how to use Azure Stream Analytics with our quickstarts, tutorials, and samples.
5
5
6
6
metadata:
7
7
title: Azure Stream Analytics documentation
8
-
description: Azure Stream Analytics is a fully managed, real-time analytics service designed to help you analyze and process fast moving streams of data that can be used to get insights, build reports or trigger alerts and actions. Learn how to use Azure Stream Analytics with our quickstarts, tutorials, and samples.
8
+
description: Azure Stream Analytics is a fully managed, real-time analytics service designed to help you analyze and process fast moving streams of data that can be used to get insights, build reports, or trigger alerts and actions. Learn how to use Azure Stream Analytics with our quickstarts, tutorials, and samples.
description: This article describes four windowing functions (tumbling, hopping, sliding, session) that are used in Azure Stream Analytics jobs.
4
+
#customer intent: As a data engineer, I want to understand the different types of windowing functions in Azure Stream Analytics so that I can choose the right one for my streaming data processing needs.
4
5
ms.service: azure-stream-analytics
5
6
ms.topic: conceptual
6
-
ms.date: 12/17/2024
7
+
ms.date: 02/18/2026
7
8
---
8
9
# Introduction to Stream Analytics windowing functions
9
10
10
-
In time-streaming scenarios, performing operations on the data contained in temporal windows is a common pattern. Stream Analytics has native support for windowing functions, enabling developers to author complex stream processing jobs with minimal effort.
11
+
In time-streaming scenarios, a common pattern is to perform operations on the data contained in temporal windows. Stream Analytics has native support for windowing functions, so you can create complex stream processing jobs with minimal effort.
11
12
12
-
There are five kinds of temporal windows to choose from:
You use the window functions in the [**GROUP BY**](/stream-analytics-query/group-by-azure-stream-analytics) clause of the query syntax in your Stream Analytics jobs. You can also aggregate events over multiple windows using the [**Windows()** function](/stream-analytics-query/windows-azure-stream-analytics).
21
+
Use the window functions in the [**GROUP BY**](/stream-analytics-query/group-by-azure-stream-analytics) clause of the query syntax in your Stream Analytics jobs. You can also aggregate events over multiple windows by using the [**Windows()** function](/stream-analytics-query/windows-azure-stream-analytics).
21
22
22
-
All the [windowing](/stream-analytics-query/windowing-azure-stream-analytics) operations output results at the **end** of the window. When you start a stream analytics job, you can specify the *Job output start time*, and the system automatically fetches previous events in the incoming streams to output the first window at the specified time; for example, when you start with the *Now* option, it starts to emit data immediately. The output of the window will be a single event based on the aggregate function used. The output event has the time stamp of the end of the window and all window functions are defined with a fixed length.
23
+
All the [windowing](/stream-analytics-query/windowing-azure-stream-analytics) operations output results at the **end** of the window. When you start a stream analytics job, you can specify the *Job output start time*. The system automatically fetches previous events in the incoming streams to output the first window at the specified time. For example, when you start with the *Now* option, it starts to emit data immediately. The output of the window is a single event based on the aggregate function used. The output event has the time stamp of the end of the window and all window functions are defined with a fixed length.
23
24
24
-
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-conceptual.png" alt-text="Diagram that shows the concept of Stream Analytics window functions.":::
25
+
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-conceptual.png" alt-text="Diagram that shows the concept of Stream Analytics window functions." lightbox="media/stream-analytics-window-functions/stream-analytics-window-functions-conceptual.png":::
25
26
26
27
## Tumbling window
27
28
@@ -33,7 +34,7 @@ The key differentiators of a tumbling window are:
33
34
- They don't overlap.
34
35
- An event can't belong to more than one tumbling window.
35
36
36
-
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-tumbling-intro.png" alt-text="Diagram that shows an example Stream Analytics tumbling window.":::
37
+
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-tumbling-intro.png" alt-text="Diagram that shows an example Stream Analytics tumbling window." lightbox="media/stream-analytics-window-functions/stream-analytics-window-functions-tumbling-intro.png":::
37
38
38
39
Here's the input data for the example:
39
40
@@ -62,9 +63,9 @@ Here's the sample output:
62
63
63
64
## Hopping window
64
65
65
-
[**Hopping**](/stream-analytics-query/hopping-window-azure-stream-analytics) window functions hop forward in time by a fixed period. It might be easy to think of them as tumbling windows that can overlap and be emitted more often than the window size. Events can belong to more than one Hopping window result set. To make a Hopping window the same as a Tumbling window, specify the hop size to be the same as the window size.
66
+
[**Hopping**](/stream-analytics-query/hopping-window-azure-stream-analytics) window functions hop forward in time by a fixed period. It might be easy to think of them as tumbling windows that can overlap and be emitted more often than the window size. Events can belong to more than one hopping window result set. To make a hopping window the same as a tumbling window, specify the hop size to be the same as the window size.
66
67
67
-
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-hopping-intro.png" alt-text="Diagram that shows an example of the hopping window.":::
68
+
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-hopping-intro.png" alt-text="Diagram that shows an example of the hopping window." lightbox="media/stream-analytics-window-functions/stream-analytics-window-functions-hopping-intro.png":::
68
69
69
70
Here's the sample data:
70
71
@@ -97,7 +98,7 @@ Here's the sample output:
97
98
98
99
[**Sliding**](/stream-analytics-query/sliding-window-azure-stream-analytics) windows, unlike tumbling or hopping windows, output events only for points in time when the content of the window actually changes. In other words, when an event enters or exits the window. So, every window has at least one event. Similar to hopping windows, events can belong to more than one sliding window.
99
100
100
-
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-sliding-intro.png" alt-text="Diagram that shows an example of a sliding window.":::
101
+
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-sliding-intro.png" alt-text="Diagram that shows an example of a sliding window." lightbox="media/stream-analytics-window-functions/stream-analytics-window-functions-sliding-intro.png":::
101
102
102
103
Here's the sample input data:
103
104
@@ -127,19 +128,19 @@ Output:
127
128
128
129
## Session window
129
130
130
-
[**Session**](/stream-analytics-query/session-window-azure-stream-analytics) window functions group events that arrive at similar times, filtering out periods of time where there's no data. It has three main parameters:
131
+
[**Session**](/stream-analytics-query/session-window-azure-stream-analytics) window functions group events that arrive at similar times. They filter out periods of time where there's no data. The session window function has three main parameters:
131
132
132
133
- Timeout
133
134
- Maximum duration
134
135
- Partitioning key (optional).
135
136
136
-
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-session-intro.png" alt-text="Diagram that shows a sample Stream Analytics session window.":::
137
+
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-session-intro.png" alt-text="Diagram that shows a sample Stream Analytics session window." lightbox="media/stream-analytics-window-functions/stream-analytics-window-functions-session-intro.png":::
137
138
138
-
A session window begins when the first event occurs. If another event occurs within the specified timeout from the last ingested event, then the window extends to include the new event. Otherwise if no events occur within the timeout, then the window is closed at the timeout.
139
+
A session window begins when the first event occurs. If another event occurs within the specified timeout from the last ingested event, the window extends to include the new event. Otherwise, if no events occur within the timeout, the window closes at the timeout.
139
140
140
-
If events keep occurring within the specified timeout, the session window keeps extending until maximum duration is reached. The maximum duration checking intervals are set to be the same size as the specified max duration. For example, if the max duration is 10, then the checks on if the window exceeds maximum duration happen at t = 0, 10, 20, 30, etc.
141
+
If events keep occurring within the specified timeout, the session window keeps extending until maximum duration is reached. The maximum duration checking intervals are the same size as the specified max duration. For example, if the max duration is 10, then the checks on if the window exceeds maximum duration happen at t = 0, 10, 20, 30, and so on.
141
142
142
-
When a partition key is provided, the events are grouped together by the key and session window is applied to each group independently. This partitioning is useful for cases where you need different session windows for different users or devices.
143
+
When you provide a partition key, the function groups the events together by the key and applies the session window to each group independently. This partitioning is useful for cases where you need different session windows for different users or devices.
143
144
144
145
Here's the sample input data:
145
146
@@ -169,9 +170,9 @@ Output:
169
170
170
171
## Snapshot window
171
172
172
-
[**Snapshot**](/stream-analytics-query/snapshot-window-azure-stream-analytics) windows group events that have the same timestamp. Unlike other windowing types, which require a specific window function (such as [SessionWindow()](/stream-analytics-query/session-window-azure-stream-analytics)), you can apply a snapshot window by adding System.Timestamp() to the GROUP BY clause.
173
+
[**Snapshot**](/stream-analytics-query/snapshot-window-azure-stream-analytics) windows group events that have the same timestamp. Unlike other windowing types, which require a specific window function (such as [SessionWindow()](/stream-analytics-query/session-window-azure-stream-analytics)), you can apply a snapshot window by adding `System.Timestamp()` to the `GROUP BY` clause.
173
174
174
-
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-snapshot-intro.png" alt-text="Diagram that shows a sample Steam Analytics snapshot window.":::
175
+
:::image type="content" source="media/stream-analytics-window-functions/stream-analytics-window-functions-snapshot-intro.png" alt-text="Diagram that shows a sample Steam Analytics snapshot window." lightbox="media/stream-analytics-window-functions/stream-analytics-window-functions-snapshot-intro.png":::
0 commit comments