Monitoring and event-driven pipelines
Associate Data Practitioner · Lesson 12 of 16 · 1:21:24
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Google Cloud Associate Data Practitioner exam, on the official exam guide. In this lesson: the Dataflow job page, Cloud Logging and Cloud Monitoring (log queries, log-based metrics, alerts), event-driven ingestion with Pub/Sub, and Eventarc triggers. Includes three original practice questions, with Cymbal Energy, a fictional electricity and gas supplier, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
A dashboard that went stale
One morning, the outage dashboard at Cymbal Energy shows data from three hours ago. Somewhere in the pipeline, something is slow, or something failed, and nobody was told. And the files from the meter vendors still wait for the nightly batch, when they could be processed the minute they arrive.
The Dataflow job page
Every Dataflow job has a page in the console, with a job graph that shows each step of the pipeline as a box, with its status, its data lag, and its wall time. When Dataflow detects a bottleneck, the job graph flags the slow step, and clicking a step shows more details. The job metrics add graphs, like data freshness for streaming jobs, which grows when the pipeline falls behind, and resource utilization, like the number of workers. And the logs panel lists the messages and errors from the pipeline and from the Dataflow service.
Cloud Logging and Cloud Monitoring
Cloud Logging collects logs from Google Cloud services, like BigQuery jobs, Dataflow workers, and audit logs. In the Logs Explorer, you filter them with the logging query language, for example severity at error or above, on one resource, and log-based metrics count the entries that match a filter. Cloud Monitoring collects metrics, shows them on dashboards, and when a condition is met, like a backlog above a threshold, it creates an alert, and notifies you through channels like email. Together, they tell you what went wrong, and warn you before users notice.
Event-driven ingestion with Pub/Sub
Some data should be processed as soon as it arrives, not on a schedule. Pub/Sub receives messages from publishers, like smart meters or apps, and delivers them to subscriptions. A BigQuery subscription writes each message straight into an existing BigQuery table, with no subscriber code and no pipeline in between, when the messages can be stored as they are. When they must be transformed or enriched first, a streaming Dataflow pipeline reads from Pub/Sub, and writes the result to BigQuery.
Eventarc triggers
Eventarc routes events to destinations, so that a pipeline starts when something happens, not at a fixed time. A trigger has filters, for example an object finalized in a given Cloud Storage bucket, and a destination. Events come straight from Google Cloud sources, from Cloud Audit Logs, or from Pub/Sub messages. Destinations include Cloud Run services, Cloud Run functions, and Workflows, which can then start a Dataflow job, run a Dataform workflow, or call Managed Airflow. So a meter file landing in a bucket can start its own load and transformation, hours before the nightly batch.
Recap
Let's recap. The Dataflow job graph shows each step, with its status, data lag, and bottlenecks, and job metrics show data freshness and workers. Cloud Logging collects logs, filtered in the Logs Explorer, and log-based metrics count matching entries. Cloud Monitoring turns metrics into dashboards and alerts, sent through notification channels. A BigQuery subscription writes Pub/Sub messages straight into a table, and Dataflow handles messages that need transformation. And Eventarc triggers start Cloud Run, functions, or Workflows when an event happens, like a file landing in a bucket.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
A streaming Dataflow job has fallen behind: its data freshness has been growing for an hour. The team wants to see which step of the pipeline is slow. Where should they look first?
- The schema of the destination table
- The list of Cloud Scheduler jobs
- The job graph on the Dataflow job page
- The billing report of the project
Show the answer
The job graph on the Dataflow job page
The job graph shows each step, with its status and data lag, and flags a bottleneck on the slow step. “The schema of the destination table” only describes the destination table. “The list of Cloud Scheduler jobs” only lists scheduled jobs, and this job is streaming. And “The billing report of the project” only shows costs, not where the pipeline is slow.
Outage alerts from the meters are published to Pub/Sub. They must land in a BigQuery table within seconds, exactly as they are, with no code to write or run. What fits?
- A streaming Dataflow pipeline
- A scheduled query every hour
- A subscriber app on a virtual machine
- A BigQuery subscription
Show the answer
A BigQuery subscription
A BigQuery subscription writes each message into the table as it arrives, with no code to write. “A streaming Dataflow pipeline” would add a pipeline to build and run, with no transformation to do. “A scheduled query every hour” would wait for the next run, instead of seconds. And “A subscriber app on a virtual machine” would add code to write and maintain.
As soon as a vendor file lands in the incoming bucket, a Cloud Run service must validate it and load it. The team does not want anything checking the bucket every few minutes. What should they set up?
- An Eventarc trigger on objects finalized in the bucket
- A Cloud Scheduler job every five minutes
- A nightly scheduled query
- A manual load after each email
Show the answer
An Eventarc trigger on objects finalized in the bucket
An Eventarc trigger on objects finalized in the bucket calls the Cloud Run service as each file lands. “A Cloud Scheduler job every five minutes” would check the bucket on a timer, which the team does not want. “A nightly scheduled query” would wait for the night. And “A manual load after each email” would make someone start every load by hand.