DP-203 Develop data processing Practice Question
You are designing a streaming job in Azure Stream Analytics. The job needs to count the number of events per device type every 10 seconds. The input is from Event Hubs. Which query should you use?
⚠ Common exam trap
Candidates often confuse HoppingWindow with TumblingWindow, thinking a hop size of 1 second still produces 10-second intervals, but HoppingWindow emits results at every hop, not at the window duration, leading to incorrect output frequency.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
SELECT DeviceType, COUNT(*) FROM Input GROUP BY DeviceType, TumblingWindow(second, 10)
A TumblingWindow(second, 10) produces non-overlapping, fixed-size 10-second windows, which is exactly what is needed to count events per device type every 10 seconds. The GROUP BY clause groups by DeviceType and the window, ensuring each device type gets its own count per window. This query meets the requirement without overlapping or sliding behavior.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
SELECT DeviceType, COUNT(*) FROM Input GROUP BY DeviceType, SessionWindow(second, 10, 30)
Why it's wrong here
SessionWindow groups events separated by gaps under 30 seconds, so window duration varies with activity rather than fixed 10-second intervals. It is tempting because session windows suit user-activity clustering, and would be correct if the requirement were grouping bursts of events per device.
- ✓
SELECT DeviceType, COUNT(*) FROM Input GROUP BY DeviceType, TumblingWindow(second, 10)
Why this is correct
TumblingWindow(second, 10) partitions events into fixed, non-overlapping 10-second intervals, satisfying the stem's requirement to count per device type every 10 seconds. Grouping by DeviceType alongside the window produces one count per device type per interval, which sliding or session windows cannot guarantee.
- ✗
SELECT DeviceType, COUNT(*) FROM Input GROUP BY DeviceType, HoppingWindow(second, 10, 1)
Why it's wrong here
HoppingWindow with a 10-second size and 1-second hop recalculates overlapping windows every second, so counts are emitted each second rather than every 10 seconds. It is tempting because hopping windows suit sliding aggregations, and would be correct if the requirement were frequent overlapping counts.
- ✗
SELECT DeviceType, COUNT(*) FROM Input GROUP BY DeviceType, SlidingWindow(second, 10)
Why it's wrong here
SlidingWindow emits output only when events occur, so a device type with no events in a 10-second interval produces no count row. It is tempting because sliding windows detect event-driven changes, and would be correct if only periods containing events needed reporting.
Go deeper
Related to this question
About these practice questions
One of 509 original DP-203 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DP-203 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-203 exam.