Book Image

Building Big Data Pipelines with Apache Beam

By : Jan Lukavský
Book Image

Building Big Data Pipelines with Apache Beam

By: Jan Lukavský

Overview of this book

Apache Beam is an open source unified programming model for implementing and executing data processing pipelines, including Extract, Transform, and Load (ETL), batch, and stream processing. This book will help you to confidently build data processing pipelines with Apache Beam. You’ll start with an overview of Apache Beam and understand how to use it to implement basic pipelines. You’ll also learn how to test and run the pipelines efficiently. As you progress, you’ll explore how to structure your code for reusability and also use various Domain Specific Languages (DSLs). Later chapters will show you how to use schemas and query your data using (streaming) SQL. Finally, you’ll understand advanced Apache Beam concepts, such as implementing your own I/O connectors. By the end of this book, you’ll have gained a deep understanding of the Apache Beam model and be able to apply it to solve problems.
Table of Contents (13 chapters)
1
Section 1 Apache Beam: Essentials
5
Section 2 Apache Beam: Toward Improving Usability
9
Section 3 Apache Beam: Advanced Concepts

Understanding schemas

A schema is a way of describing a nested structure of a Java object. A typical Java object contains fields that have string names and data types.

Let's see the following Java class:

public class Position {
  double latitude; 
  double longitude;
}

This class has two fields called latitude and longitude, respectively, both of which are of the double type. The matching Schema property of this class would be as follows:

Position: Row
  latitude: double
  longitude: double

This notation declared a Position type with a schema of the Row type containing two fields, latitude and longitude, both of the double type. A Row is one of Apache Beam's built-in schema types with a nested structure – the others are Array, Iterable, and Map with their usual definitions in computer science. The difference between Array and Iterable is that Iterable does not have a known size until it's iterated over. This...