Cloud Digital Leader Google Cloud Products and Services Practice Question
A data engineer needs to process a continuous stream of clickstream events from multiple sources, aggregate them into 1-minute windows, and write the results to BigQuery for real-time dashboarding. The solution must handle exactly-once processing semantics. Which combination of services should they use?
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
✓
Pub/Sub -> Dataflow -> BigQuery
Dataflow (Apache Beam) provides exactly-once processing semantics and can read from Pub/Sub, apply windowed aggregations, and write to BigQuery. Pub/Sub is the ingestion layer for streaming events. Cloud Functions and Cloud Run are not designed for stateful windowed aggregations at scale, and Cloud Dataproc (Hadoop/Spark) would require more overhead.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Pub/Sub -> Dataflow -> BigQuery
Why this is correct
Dataflow's unified streaming engine natively supports exactly-once processing via commit-and-finish plus its shuffle, and it provides event-time windowing and trigger strategies for late data. Its built-in BigQuery sink batches streaming records into load jobs, making this pipeline the recommended way to continuously ingest Pub/Sub events into BigQuery for clickstream analytics.
- ✗
Pub/Sub -> Cloud Functions -> BigQuery
Why it's wrong here
Cloud Functions is a serverless, stateless compute service that processes events one at a time with no built-in stateful windowing or sessionization. Pub/Sub guarantees at-least-once delivery, so Cloud Functions would require you to implement custom deduplication and external state stores to achieve exactly-once semantics, which quickly becomes complex and brittle for aggregations.
- ✗
Cloud Storage -> Dataflow -> BigQuery
Why it's wrong here
Cloud Storage is an object store designed for batch analytics, not real-time event streaming; you would have to continuously write files and schedule loads, adding latency and never producing a true continuous stream. Pub/Sub is the correct ingestion service for low-latency, high-throughput clickstream events, so starting with Cloud Storage violates the streaming requirement.
- ✗
Pub/Sub -> Cloud Dataproc -> BigQuery
Why it's wrong here
Cloud Dataproc can run Spark Structured Streaming to consume Pub/Sub, but achieving exactly-once output to BigQuery requires careful checkpoint management and idempotent sink configuration, plus ongoing cluster lifecycle management. Dataflow abstracts these concerns with its service-managed exactly-once guarantees and native BigQuery integration, making Dataproc a heavier and more configuration-prone choice here.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
Learn chapter
Cloud Digital Transformation
Key term
Pub/Sub
Pub/Sub is a messaging pattern where publishers send messages without knowing who receives them, and subscribers receive only the messages they care about.
Key term
Dataflow
Dataflow is a Google Cloud managed service that processes and transforms data in real-time or batch mode using Apache Beam pipelines.
About these practice questions
This GCDL question is part of Courseiva's 829-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 GCDL 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 GCDL exam.