All guides
Practice now
D2 · Exploring data with Google Cloud

Data pipelines: Pub/Sub, Dataflow, and Looker

How to move, transform, and visualize data in Google Cloud. The standard GCP pipeline and BI tools.

The standard GCP data pipeline

Reference architecture

Source

Apps, IoT, Logs

→

Pub/Sub

Messaging

→

Dataflow

Transformation

→

Warehouse

→

Looker

Visualization

Real-time streaming pipeline. For batch: Cloud Storage → Dataflow → BigQuery

in depth

Publisher-subscriber model

Publisher

Produces messages and sends them to a Topic. It doesn't know who will read them. It can be an app, an IoT sensor, a log, etc.

Topic

Message channel. Messages are stored until they are acknowledged by all subscribers or until the retention period expires (max 7 days).

Subscription

Receiver of messages from a topic. Can be push (Pub/Sub sends) or pull (the subscriber asks). Multiple subscriptions per topic.

FeatureDetail
Delivery guaranteeAt-least-once: a message can be delivered more than once. Consumers must be idempotent or use the Exactly-once option.
ThroughputUp to millions of messages per second. Scales automatically with no configuration.
Fan-outA topic can have multiple subscriptions — each subscriber receives all messages independently.
Dead Letter TopicsMessages that cannot be processed after N attempts are redirected to another topic for analysis.
Message orderingWith an Ordering Key, messages with the same key are delivered in order. Without a key, order is not guaranteed.
RetentionMessages retained for up to 7 days. Allows replaying past messages to a new subscription.

Dataflow: data processing

is the managed service for running data pipelines based on Apache Beam. The same code works for batch (historical data) and streaming (real-time data) — this is called Beam's unified programming model.

Serverless

No workers to configure. Dataflow provisions and scales automatically.

Batch + Streaming

The same Apache Beam pipeline processes historical or real-time data.

Templates

Predefined templates for common cases: Pub/Sub → BigQuery, GCS → BigQuery, etc.

Integration

Reads from Pub/Sub, , BigQuery. Writes to BigQuery, Cloud Storage, Bigtable.

Dataflow vs Dataproc

Dataflow (use when)

  • • New pipeline with no legacy code
  • • You want serverless without managing clusters
  • • You need batch AND streaming with the same code
  • • You're willing to learn Apache Beam

Dataproc (use when)

  • • You have existing Hadoop/Spark code
  • • You want to migrate an on-premises pipeline
  • • The team already knows Spark/Hive/Pig
  • • You need the full Hadoop ecosystem

Looker and Looker Studio: BI and visualization

(Enterprise BI)

  • • Enterprise BI platform with LookML (data modeling language)
  • • Single source of truth: metrics are defined once in LookML
  • • Embedded analytics: integrate reports into your own apps
  • • Connects to BigQuery, , and 50+ databases
  • • Pricing: per-user license (more expensive)

Looker Studio (formerly Data Studio)

  • • Free: reporting and interactive dashboard tool
  • • Connects directly to BigQuery, Google Sheets, Analytics, etc.
  • • Drag-and-drop to build visualizations without code
  • • Ideal for small teams and marketing/sales reports
  • • Looker Studio Pro available for enterprise features

Did you get this topic?

Test what you just learned

An IoT sensor monitoring system generates 1 million events per second. The data must be processed in real time to detect anomalies and stored in BigQuery for historical analysis. Which GCP architecture is correct?

Ready to test "Data pipelines: Pub/Sub, Dataflow, and Looker"?

Put what you learned to the test with original CDL exam questions.

Start CDL mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.