Reference patterns

This page provides links to sample code and technicalreference guides for common Dataflow use cases. Use these resources tolearn, identify best practices, and build features with sample code.

The reference patterns listed here are code-oriented and meant to get youquickly to implementation. To see a broader range of Dataflowsolutions, review the list ofDataflow technical reference guides.

General analytics

SolutionDescriptionLinks
Building a real-time website analytics dashboard

Learn how to build a dashboard that provides real-time metrics you can use to understand the performance of incentives or experiments on your website.

Sample code:Realtime Analytics using Dataflow and Memorystore

Overview video:Level Up - Real-time analytics using Dataflow and Memorystore

Building a pipeline to transcribe and analyze speech files

Use Dataflow to transcribe and analyze uploaded speech files, then save that data to BigQuery for use in visualizations.

Sample code:Speech Analysis Framework

Log analytics

SolutionDescriptionLinks
Building a pipeline to capture Dialogflow interactions

Use Dataflow to build a pipeline to capture and store Dialogflow interactions for further analysis.

Sample code:Dialogflow log parser

Pattern recognition

SolutionDescriptionLinks
Detecting objects in video clips

This solution shows you how to build a real-time video clip analytics solutionfor object tracking by using Dataflow and the Video Intelligence API, allowing youto analyze large volumes of unstructured data in near real time.

Sample code:Video Analytics Solution Using Dataflow and the Video Intelligence API

Apache BeamPtransform for calling Video Intelligence API:apache_beam.ml.gcp.videointelligenceml module

Anonymize (de-identify) and re-identify PII data in your smart analytics pipelineThis series of solutions shows you how to use Dataflow, Sensitive Data Protection,BigQuery, and Pub/Sub to de-identify and re-identifypersonally identifiable information (PII) in a sample dataset.

Technical reference guides:

Sample code:Migrate Sensitive Data in BigQuery Using Dataflow and Cloud Data Loss Prevention

Predictive forecasting

SolutionDescriptionLinks
Predict mechanical failures using a vision analytics pipeline

This solution guides you through building a Dataflow pipeline to deriveinsights from large-scale image files stored in a Cloud Storage bucket. Automatedvisual inspection can help meet manufacturing goals, such asimproving quality control processes or monitoring worker safety, while reducingcosts.

Sample code:Vision Analytics Solution Using Dataflow and Cloud Vision API

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.