Reference patterns

This page provides links to sample code and technical reference guides for common Dataflow use cases. Use these resources to learn, identify best practices, and leverage sample code to build the features that you need.

The reference patterns listed here are code-oriented and meant to get you quickly to implementation. To see a broader range of Dataflow solutions, review the list of Dataflow technical reference guides.

Anomaly detection

Solution Description Links
Building a Telecom network anomaly detection application using k-means clustering

This solution shows you how to build an ML-based network anomaly detection application for telecom networks to identify cyber security threats by using Dataflow, BigQuery ML and Cloud Data Loss Prevention.

Technical reference guide: Building a secure anomaly detection solution using Dataflow, BigQuery ML, and Cloud Data Loss Prevention

Sample code: Anomaly Detection in Netflow logs

Blog post: Anomaly detection using streaming analytics and AI

Overview video: Building a Secure Anomaly Detection Solution

Finding anomalies in financial transactions in real time using BoostedTrees

Use this reference implementation to learn how to identify fraudulent transactions by using a TensorFlow boosted tree model with Dataflow and AI Platform.

Technical reference guide: Detecting anomalies in financial transactions by using AI Platform, Dataflow, and BigQuery

Sample code: Anomaly Detection in Financial Transactions

General analytics

Solution Description Links
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

Processing audio clips into a transcript by using Dataflow and the Speech-to-Text API

Learn how to process audio clips in real time to create a transcript in WebVTT format.

Sample code: Automatic WebVTT Caption From Streaming STT API By Using Dataflow

Log analytics

Solution Description Links
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

Processing logs at scale using Dataflow

Learn to build analytical pipelines that process log entries from multiple sources, then combine the log data in ways that help you extract meaningful information.

Technical reference guide: Processing Logs at Scale Using Dataflow

Sample code: Processing Logs at Scale Using Dataflow

Pattern recognition

Solution Description Links
Detecting objects in video clips

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

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

Apache Beam Ptransform for calling Video Intelligence API: module

Anonymize (de-identify) and re-identify PII data in your smart analytics pipeline This series of solutions shows you how to use Dataflow, Cloud Data Loss Prevention, BigQuery, and Pub/Sub to de-identify and re-identify personally 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

Solution Description Links
Predict mechanical failures using a vision analytics pipeline

This solution guides you through building a Dataflow pipeline to derive insights from large-scale image files stored in a Cloud Storage bucket. Automated visual inspection can help meet manufacturing goals, such as improving quality control processes or monitoring worker safety, while reducing costs.

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