Smart Analytics on Google Cloud: Looker, Streaming Analytics, Pub/Sub, Dataflow and Spark (Cloud Digital Leader)
Smart analytics on Google Cloud means turning data into decisions and actions: business intelligence tools such as Looker put governed data in the hands of the people who decide, and streaming analytics with Pub/Sub and Dataflow lets a business act on events while they are still happening. This lesson covers task 2.3 of the Google Cloud Digital Leader exam guide. It explains how Looker democratizes access to data and keeps numbers consistent with its semantic model, why Looker on BigQuery gives current reports and dashboards, and how Looker data is integrated into everyday workflows. It then explains why real-time streaming analytics matters, and describes the main products that modernize data pipelines: Pub/Sub, Dataflow and Managed Service for Apache Spark.
On this page9 sections
- How Looker democratizes access to data
- A single source of truth: Looker's semantic model (LookML)
- Looker on BigQuery: current reports and dashboards
- Integrating data into workflows
- Why real-time streaming analytics is critical
- Pub/Sub: event ingestion and delivery
- Dataflow: serverless batch and streaming processing
- Managed Service for Apache Spark: run existing Spark and Hadoop jobs
- Putting it together: a modern data pipeline
- Describe how Looker democratizes access to data through governed self-service exploration
- Explain how Looker's semantic model (LookML) gives every team one trusted definition of each metric
- Recognize the value of analyzing BigQuery data in Looker for current reports, dashboards and workflow integration
- Explain why real-time streaming analytics is critical and when batch analytics is enough
- Describe the roles of Pub/Sub, Dataflow and Managed Service for Apache Spark in a modern data pipeline
- Choose a pipeline design that meets stated constraints such as latency, no clusters, or no rewriting
How Looker democratizes access to data
Looker democratizes data by letting business users explore governed data and build their own reports in a web browser, without writing SQL or waiting for an analyst. A sales manager picks fields such as region, product and revenue, applies filters, and Looker writes and runs the query for them.
Before self-service tools, every new question went into an analyst's queue. A manager who wanted last quarter's sales by region might wait days for a query to be written. That delay means decisions are made on instinct or on stale numbers. With Looker, the people closest to the decision can answer most of their own questions, and analysts spend their time on harder problems.
Self-service still has guardrails
Democratized does not mean uncontrolled. Looker access is governed by permissions:
- Role-based access decides what each user can do, such as view dashboards, explore data or edit the model.
- Data-level controls can limit which rows each user sees. A franchise chain, for example, can give every store manager the same sales model while each manager sees only their own store's figures.
So the goal is wider access to trusted data, within the rules the organization sets: more people answering their own questions, from one governed source, with permissions decided centrally.
A single source of truth: Looker's semantic model (LookML)
Looker's semantic model is a shared layer, written in Looker's modeling language LookML, that defines each business metric and relationship once so every report uses the same definition. Data teams describe in LookML how tables join and how measures such as revenue, gross margin or active customer are calculated. Business users then explore through that model rather than writing their own calculations.
The business benefit is consistency. When a metric's logic is scattered across many separate queries and workbooks, two reports can disagree about the same figure and nobody can say which is right. With a metric defined once in the model, every dashboard and every self-service exploration reuses the same trusted logic, and a change to the definition updates every report that uses it.
| The semantic model (LookML) | What it is not |
|---|---|
| Defines metrics, dimensions and joins once, in version-controlled code | Not a data store: the data stays in the database, such as BigQuery |
| Turns users' field choices into correct SQL behind the scenes | Not an ingestion or pipeline tool: it does not collect or move events |
| Lets many people self-serve from the same governed logic | Not a replacement for access controls in the database itself |
The model is what lets governance and self-service coexist. When people's figures disagree, the lasting fix is to settle the business rule once in the model (for example, whether paused subscriptions count as active customers) so that every exploration inherits it, while users keep building their own views.
Looker on BigQuery: current reports and dashboards
Analyzing and visualizing BigQuery data in Looker gives reports and dashboards that reflect the data in the warehouse now, because Looker queries BigQuery in place rather than working from a copy. Looker generates SQL from the model and sends it to BigQuery, which does the heavy processing; there is no nightly extract into a separate reporting store to go stale.
Looker does cache query results to avoid repeating identical work. How long a cached result is reused is set in the model, for example with a short maximum cache age or a datagroup tied to when new data is loaded. With a suitable policy, a dashboard reflects new rows shortly after they reach BigQuery. When the data itself arrives continuously (see the pipeline sections below), managers can watch near real-time dashboards, such as call-centre queue lengths updating within minutes.
The value for the business is the combination of BigQuery's scale with Looker's governed self-service: large datasets can be analysed interactively by many people, and everyone sees the same current figures.
Integrating data into workflows
Integrating data into workflows means putting Looker data where people already work, or into the systems that act on it, so an insight leads to action without anyone copying numbers by hand. Looker supports this in several ways:
- Scheduled delivery. Dashboards and reports can be sent on a schedule, or when data meets a condition, to destinations such as email, chat tools and file storage. Managers receive the report instead of having to remember to open it.
- Sending data to other services. Looker can send query results to other applications through integrations (Looker actions) and webhooks. For example, a list of overdue invoices can be sent to the finance team's collections tool, or a low-stock result can open a purchase request in the procurement system.
- Embedded analytics. Looker dashboards and visualizations can be embedded inside a company's own web application or portal, so customers or partners get analytics as part of the product they already use. A freight broker, for example, can show each shipper its own on-time delivery metrics inside the broker's customer portal.
The value is shorter time from insight to action. Every manual hand-off between seeing a number and acting on it adds delay and room for error; workflow integration moves the data to the people and systems that act on it, in the form they need.
Why real-time streaming analytics is critical
Real-time streaming analytics is critical because many business decisions lose their value if they are made minutes or hours after the event. Streaming analytics processes data continuously as it is generated, so a business can act while the moment is still happening. Batch analytics collects data and processes it at intervals, such as nightly, which suits reviews of a closed period.
| Streaming analytics | Batch analytics | |
|---|---|---|
| When data is processed | Continuously, within seconds of each event | On a schedule, over a collected set of data |
| Typical questions | What is happening now, and what should we do about it? | What happened last day, week or quarter? |
| Examples | Flagging an unusual sign-in to an online account as it happens; adjusting flash-sale prices as stock runs down; alerting engineers when a wind turbine's vibration spikes; detecting a mobile network outage in one area; promoting a news story while it is trending | Monthly management accounts; year-end compliance reporting; comparing last season's campaign results |
The decision rule is about time to act: if the insight is worthless a few minutes later, it needs streaming. If it reviews a closed period, batch is cheaper and simpler. Modern businesses usually need both, which is why a pipeline that can handle both styles matters (see Dataflow below). Streaming also feeds live dashboards and AI models that score each event, such as an anomaly score for each sensor reading.
Pub/Sub: event ingestion and delivery
Pub/Sub is Google Cloud's fully managed, scalable messaging service: it receives event messages from producers and delivers them asynchronously to every system that subscribes. It is typically the front door of a streaming pipeline, absorbing large volumes of events, such as millions of player actions or sensor readings per second, from apps and devices.
- Publishers send messages to a topic.
- Each consuming system has its own subscription to the topic and receives the messages independently.
The key business value is decoupling. A producer publishes each event once and moves on; it does not need to know who consumes the event, how many consumers there are, or whether one of them is running slowly. Pub/Sub holds messages until each subscriber acknowledges them, so a consumer that falls behind catches up later without holding anyone else back. Teams can add consumers over time by adding subscriptions, and producers and consumers can be changed and scaled independently.
Pub/Sub is not a processing engine. Apart from light per-message changes (single message transforms, such as masking or reformatting a field), it does not de-duplicate, join or aggregate events, and it does not visualize anything. It can deliver messages straight into BigQuery through a BigQuery subscription, which writes each message as it arrives. When events must be cleaned, combined or summarised first, a processing step such as Dataflow sits between Pub/Sub and the warehouse.
Dataflow: serverless batch and streaming processing
Dataflow is Google Cloud's serverless service for processing data in both batch and streaming mode, running pipelines written with the open-source Apache Beam programming model. Dataflow transforms data on the way through a pipeline: cleaning, enriching, de-duplicating, joining and aggregating it, for example joining a stream of sensor readings with a table of device details and averaging the readings over five-minute windows before they are stored.
Two things make Dataflow valuable to a business:
- One programming model for batch and streaming. The same Beam pipeline code can process archived files and a live stream. Logic is written once, so a backfill over last year's history and today's live feed calculate results the same way, and there is one codebase to maintain instead of two.
- Serverless operation. There are no clusters to size or manage; Dataflow provisions and scales workers automatically and charges for the resources a job uses. That suits small data teams that want results, not infrastructure.
Dataflow is the natural choice for new pipelines. Existing Spark or Hadoop jobs would have to be rewritten as Beam code to run on Dataflow, which is where the next product fits.
Managed Service for Apache Spark: run existing Spark and Hadoop jobs
Managed Service for Apache Spark (formerly Dataproc) runs open-source Apache Spark and Hadoop-ecosystem jobs on managed Google Cloud clusters, so an organization can move existing data processing jobs to the cloud and generally run them as they are. It is the modernization path when the constraint is "keep the code we have".
- Keep jobs and skills. The service runs the same open-source frameworks the jobs already use, so code, libraries and team skills carry over.
- Elastic, pay-for-use clusters. A cluster can be created in minutes for a workload, resized as demand changes, and deleted once the work is done, so you pay while jobs run rather than for hardware that stands waiting.
- Less operations work. Google Cloud manages cluster provisioning and the software stack, instead of the company maintaining its own hardware.
Google Cloud also offers a separate product, Serverless for Apache Spark, which runs Spark workloads without the customer managing clusters at all. Spark on Google Cloud therefore does not always mean operating clusters, but the managed-cluster service is the one built for lifting existing Spark and Hadoop estates.
| Need | Product |
|---|---|
| Collect events at scale and fan them out to many systems | Pub/Sub |
| New batch or streaming processing with no clusters to manage | Dataflow |
| Move existing Spark or Hadoop jobs to managed clusters | Managed Service for Apache Spark |
| Build data integration pipelines visually, with little code | Cloud Data Fusion |
| Move an existing data warehouse (schemas, SQL) into BigQuery | BigQuery Migration Service |
| Store and analyse the results at scale | BigQuery |
| Self-service exploration, dashboards and workflow integration | Looker |
Putting it together: a modern data pipeline
A modern streaming pipeline on Google Cloud typically runs Pub/Sub → Dataflow → BigQuery → Looker: Pub/Sub ingests events, Dataflow processes them continuously, BigQuery stores and analyses the results, and Looker turns them into governed dashboards and workflow actions. Every stage is managed, and the ingest, processing and warehouse stages are serverless.
Real scenarios add constraints, and the right design is the one that meets all of them, not just most:
- Latency. A pipeline is only as fast as its slowest stage. If results must appear within a minute or two, every stage has to work continuously; one scheduled step sets the delay for the whole pipeline.
- Operations. When the team wants nothing to run or patch, check every stage for clusters, not only the processing step.
- Existing code. Where a large body of working Spark or Hadoop jobs exists, the cost and risk of rewriting usually outweigh the benefit, so move those jobs as they are.
Organizations often mix approaches. A manufacturer, for example, might move its nightly Spark reporting jobs to Managed Service for Apache Spark as they are, while building a new serverless feed on Pub/Sub and Dataflow that flags equipment faults as readings arrive. Choosing per workload beats forcing every job onto one product. Which database or storage product holds the data is covered in the companion lesson on Google Cloud data management products.
Tip. Questions on this topic are mostly short business scenarios that ask which Google Cloud product or approach fits a need, or what value an approach creates. You may be asked how Looker widens access to data, why a shared semantic model matters, why Looker dashboards on BigQuery stay current, or what counts as integrating data into workflows. Others ask when streaming analytics is worth it compared with batch, or which product ingests, processes or runs existing jobs in a pipeline. Watch the deciding details: whether users must keep self-service, whether jobs already exist and must not be rewritten, whether the team wants no clusters, and how quickly results must appear. Harder items combine two needs, such as existing jobs plus a new real-time feed, and offer options that each meet only part of the requirement. Expect a few Select TWO items.
- Looker democratizes data: business users explore governed data and build reports without writing SQL, within role-based permissions.
- Looker's semantic model, written in LookML, defines each metric once, so every report and self-service user gets the same numbers.
- Self-service and governance work together: when figures disagree, settle the business rule once in the model so every user inherits it.
- Looker queries BigQuery in place instead of working from an extract, so dashboards stay current, subject to the model's cache policy.
- Workflow integration puts Looker data into other tools: scheduled delivery, sending results to other services through actions and webhooks, and embedded analytics in your own application.
- Streaming analytics matters when an insight loses its value within minutes (security alerts, live pricing, equipment faults); batch suits reviews of a closed period.
- Pub/Sub ingests events at scale and delivers them asynchronously to many subscribers, decoupling producers from consumers.
- Dataflow is serverless batch and streaming processing on Apache Beam: one codebase for both, no clusters to manage.
- Managed Service for Apache Spark (formerly Dataproc) runs existing Spark and Hadoop jobs largely as they are, on managed clusters you create and delete as work requires.
- A typical modern pipeline is Pub/Sub ingest, Dataflow processing, BigQuery storage and analysis, and Looker visualization.
Frequently asked questions
How does Looker democratize access to data?
Looker lets business users explore data and build their own reports and dashboards in a web browser without writing SQL, so they no longer wait for analysts to write queries. Access stays governed: role-based permissions decide what each user can do, and data-level controls can limit which records each group sees. The result is wider access to trusted, consistent data rather than uncontrolled copies.
What is LookML and why does it matter to the business?
LookML is Looker's modeling language. Data teams use it to define once how tables relate and how business metrics such as revenue or gross margin are calculated. Every dashboard and self-service exploration then reuses those definitions, so teams act on the same numbers instead of arguing over different spreadsheet calculations. LookML describes the data; it does not store it.
Why do Looker dashboards on BigQuery stay current?
Looker generates SQL from its model and runs it in BigQuery each time, instead of reading from a nightly extract held in a separate reporting store. Looker caches results to avoid repeated work, and the cache policy set in the model (such as a maximum age or a datagroup tied to data loads) decides how long a cached result is reused. With continuously loaded data, dashboards can reflect new data within minutes.
What does integrating data into workflows mean in Looker?
It means delivering Looker data to where people act on it rather than leaving it on a dashboard. Examples are scheduled report delivery to email or chat, sending query results to other business systems through Looker actions and webhooks, and embedding Looker analytics inside a company's own application or portal for customers or partners.
What is the difference between streaming and batch analytics?
Streaming analytics processes each event continuously within seconds of it happening, so a business can act in the moment, for example alerting engineers when a machine's readings turn abnormal or adjusting prices as stock runs down. Batch analytics processes collected data on a schedule, such as nightly, and suits reviews of a closed period like monthly reporting. Most organizations need both.
What is the difference between Pub/Sub and Dataflow?
Pub/Sub is a messaging service: it receives event messages from producers and delivers them asynchronously to each subscribing system. Beyond light per-message transforms it does not process them. Dataflow is a processing service: it cleans, de-duplicates, joins and aggregates data in batch or streaming mode using Apache Beam pipelines, with no clusters to manage. In a typical streaming pipeline, Pub/Sub feeds events into Dataflow, which writes results to BigQuery.
When should an organization use Managed Service for Apache Spark instead of Dataflow?
Managed Service for Apache Spark, formerly called Dataproc, fits when an organization already has Spark or Hadoop jobs and wants to move them to Google Cloud largely as they are, on managed clusters it can create for a workload and delete afterwards. Dataflow fits new batch or streaming pipelines where the team wants serverless processing with no clusters to manage; existing Spark jobs would need rewriting as Apache Beam code to run there.
What does a modern streaming data pipeline on Google Cloud look like?
A common design is Pub/Sub to ingest events from apps and devices, Dataflow to process them continuously, BigQuery to store and analyse the results, and Looker to present governed dashboards and push insights into workflows. The ingest, processing and warehouse stages are serverless, so a small team can run live analytics without operating clusters.
Source
This lesson covers the "Exploring Data Transformation with Google Cloud" domain of the official CDL exam guide. Vendors revise their guides — check the source for the current version.
- Google Cloud Digital Leader certification and exam guide — Google Cloud
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.