Streaming Analytics Windowing Functions Flashcards
There are five kinds of temporal windows to choose from…
Tumbling,Hopping,Sliding,Session, andSnapshotwindows
You use the window functions in the…….. of the query syntax in your Stream Analytics jobs.
GROUP_BY clause
You can also aggregate events over multiple windows using the….
Windows() function
All thewindowingoperations output results at the….of the window
End
Note that when you start a stream analytics job, you can specify the…..and the system will automatically fetch previous events in the incoming streams to output the first window at the specified time; for example when you start with theNowoption, it will start to emit data immediately. The output of the window will be a ….. The output event will have the time stamp of the …. of the window and all window functions are defined with ……
(hint: when you start? how do you start?)
(hint: what do streaming windows capture?)
(hint: start or end)
(hint: all window functions last for a specific amount of time or …)
Job output start time
single event based on the aggregate function used.
end
a fixed length
SELECT System.Timestamp() as WindowEndTime, TimeZone, COUNT(*) AS Count
FROM TwitterStream TIMESTAMP BY CreatedAt
GROUP BY TimeZone, TumblingWindow(second,10)
Will return?
WindowEndTime TimeZone Count
Example:
2021-10-26T10:15:10 - PST - 5
2021-10-26T10:15:20 - PST - 2
Tumbling window
Tumblingwindow functions are used to segment a data stream into …. and perform a function against them.
The key differentiators of a Tumbling window are that they repeat, do not overlap, and an event cannot belong to more than one tumbling window.
distinct time segments
Tumbling window
Tumblingwindow functions are used to segment a data stream into distinct time segments and perform a function against them.
The key differentiators of a Tumbling window are that they …
repeat, do not overlap, and an event cannot belong to more than one tumbling window.
Hopping window
Hoppingwindow functions hop … by …. It may 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.
hop forward in time
a fixed period
Hopping window
Hoppingwindow functions hop … by …. It may be easy to think of them …. Events can belong to more than one Hopping window result set. To make a Hopping window the same as a Tumbling window, …
hop forward in time
a fixed period
as Tumbling windows that can overlap and be emitted more often than the window size
specify the hop size to be the same as the window size.
Hopping window
Hoppingwindow functions hop forward in time by a fixed period. It may 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.
SELECT System.Timestamp() as WindowEndTime, Topic, COUNT(*) AS Count
FROM TwitterStream TIMESTAMP BY CreatedAt
GROUP BY Topic, HoppingWindow(second,10,5)
WindowEndTime - Topic - Count
2021-10-26T10:15:10 - Streaming - 5
2021-10-26T10:15:15 - Streaming - 3
2021-10-26T10:15:20 - Streaming - 2
Sliding window
Slidingwindows, unlike Tumbling or Hopping windows, output events only for points in time when the …. 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.
content of the window actually changes
Sliding window
Slidingwindows, 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 …. So, every window has at least one event. Similar to Hopping windows, events can belong to more than one sliding window.
enters or exits the window
Sliding window
Slidingwindows, 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 …. Similar to Hopping windows, events can belong to more than one sliding window.
at least one event