hardMultiple ChoiceObjective-mapped
PDE Practice Question: A manufacturing company wants to detect anomalies…
A manufacturing company wants to detect anomalies in sensor data from thousands of IoT devices in real time. The data is streaming into Pub/Sub. The best solution should use a machine learning model served from AI Platform that scores sensor readings aggregated over 5-minute windows. Which pipeline design meets these requirements?
⚠ Common exam trap
Google Cloud often tests the distinction between stream processing (Dataflow) and batch-oriented services (BigQuery scheduled queries), and the trap here is assuming that BigQuery's streaming inserts combined with scheduled queries can achieve real-time aggregation, when in fact scheduled queries introduce minutes of delay and are not window-aware for sliding time intervals.
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
✓
Use Cloud Dataflow with sliding windows to aggregate sensor readings every 5 minutes, then call a trained model hosted on AI Platform Prediction for each window
Cloud Dataflow's sliding windows natively handle the 5-minute aggregation requirement for streaming data, and its ability to call external services via a DoFn allows integration with AI Platform Prediction for real-time model scoring. This design aligns with the need for low-latency, scalable processing of Pub/Sub streams without managing infrastructure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Cloud Dataproc with Spark Streaming to aggregate data, and use a Spark ML model embedded in the pipeline
Why it's wrong here
Dataproc with Spark Streaming is possible but requires more operational overhead and does not integrate as seamlessly with AI Platform.
- ✗
Use BigQuery streaming inserts and run scheduled queries that call the ML model
Why it's wrong here
BigQuery streaming inserts and scheduled queries introduce latency in minutes, not real-time.
- ✓
Use Cloud Dataflow with sliding windows to aggregate sensor readings every 5 minutes, then call a trained model hosted on AI Platform Prediction for each window
Why this is correct
Dataflow handles streaming and windowing natively, and AI Platform Prediction provides low-latency model serving.
- ✗
Use Cloud Functions triggered by Pub/Sub to process each sensor reading individually
Why it's wrong here
Cloud Functions cannot aggregate over time windows; it processes each message independently.
Go deeper
Related to this question
About these practice questions
This PDE question is part of Courseiva's 890-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PDE practice question is part of Courseiva's free Google Cloud 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 PDE exam.