Streaming messages into BigQuery as they arrive rather than in batches
Pub/Sub enables event-driven ingestion by publishing messages the moment data is generated, allowing near real-time delivery into BigQuery without polling or scheduled batch jobs. This pattern suits streaming use cases like clickstream analytics, IoT telemetry, application logs, and transactional events where low latency matters. Google Cloud offers multiple managed paths to move Pub/Sub data into BigQuery, each trading off simplicity versus transformation flexibility.
1 · Learn the must-know
- The Pub/Sub BigQuery subscription writes messages directly to a BigQuery table without needing Dataflow, ideal for simple schema-matched ingestion.
- Dataflow with the Pub/Sub-to-BigQuery template (or custom pipeline) is used when messages require transformation, enrichment, windowing, or complex parsing before landing in BigQuery.
- Pub/Sub guarantees at-least-once delivery, so downstream BigQuery tables or Dataflow pipelines must handle potential duplicate messages (e.g., via message IDs or dedup logic).
- Event-driven ingestion from Pub/Sub suits variable or unpredictable data arrival rates, unlike scheduled batch loads (e.g., BigQuery Data Transfer Service) which fit predictable, periodic data.
- Schema mismatches between Pub/Sub message payloads and the destination BigQuery table cause ingestion failures, so schema design and message format (JSON/Avro) must be planned upfront.
- Use Pub/Sub-to-BigQuery ingestion for use cases needing fresh, continuously updated data for dashboards or alerting, rather than for large historical batch loads better suited to other ingestion tools.
2 · Check your understanding
A retail company generates clickstream events from its website and wants these events available in a BigQuery table within seconds of being generated. The event schema already matches the destination table and no transformation is required before the data lands. Which approach best fits this use case?
What you have tried across GCP ADP's objectives, not a readiness score.
Data Preparation and Ingestion~30% of the exam0 of 8 tried
Data Analysis and Presentation~27% of the exam0 of 12 tried
Data Pipeline Orchestration~18% of the exam0 of 9 tried
Data Management~25% of the exam0 of 12 tried
3 · Keep going
Ready for more? Take a weighted mock or try free practice questions.