
Design a pipeline that reads a CSV web analytics dataset, computes session duration from timestamps, maps IPs to countries, and averages duration by country, then writes results into fire.
Create and activate a Python 3.7 virtual environment named Apache Beam Tutorial, install Apache Beam and the Google Cloud Dataflow package to deploy pipelines to Dataflow.
Create an Apache Beam pipeline inside a function and run it from a top-level if block, using a context manager to wrap transforms and set logging to warning.
Configure pipeline options in Apache Beam Python using Pipeline Options to manage custom and default arguments, specify input and output paths, and choose runners like DirectRunner or Dataflow.
Format text lines in a beam pipeline by converting each line string into a list of fields with the map transformation, splitting by commas, and print results to verify locally.
Use a ParDo with a DoFn to compute visit durations from start and end timestamps. Convert strings to datetimes, subtract to get seconds, and yield the IP with the duration.
Call an external API from a DoFn in beam to map IP addresses to countries, using requests to IP API dot com and return country and IP.
Combine the IP map with duration data using a side input in Apache Beam to map each IP to its country and compute the average duration for each country.
Finish an Apache Beam Python pipeline by writing the results to a csv file using the write to text transform, specifying an output prefix and a country-level average session duration.
Apache Beam is an open-source programming model for defining large scale ETL, batch and streaming data processing pipelines. It is used by companies like Google, Discord and PayPal.
In this course you will learn Apache Beam in a practical manner, with every lecture comes a full coding screencast. By the end of the course you'll be able to build your own custom batch data processing pipeline in Apache Beam.
This course includes 20 concise bite-size lectures and a real-life coding project that you can add to your Github portfolio! You're expected to follow the instructor and code along with her.
You will learn:
How to install Apache Beam on your machine
Basic and advanced Apache Beam concepts
How to develop a real-world batch processing pipeline
How to define custom transformation steps
How to deploy your pipeline on Cloud Dataflow
This course is for all levels. You do not need any previous knowledge of Apache Beam or Cloud Dataflow.