Reader small image

You're reading from  Building Big Data Pipelines with Apache Beam

Product typeBook
Published inJan 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781800564930
Edition1st Edition
Languages
Right arrow
Author (1)
Jan Lukavský
Jan Lukavský
author image
Jan Lukavský

Jan Lukavský is a freelance big data architect and engineer who is also a committer of Apache Beam. He is a certified Apache Hadoop professional. He is working on open source big data systems combining batch and streaming data pipelines in a unified model, enabling the rise of real-time, data-driven applications.
Read more about Jan Lukavský

Right arrow

Table-stream duality

We will conclude this chapter with something that should already feel natural but is worth noting explicitly – that is, table-stream duality. We will use this concept in the next chapter, but because we have already worked with primary keys, join keys, and values, the definition naturally fits into this chapter.

We have seen two types of streams supporting deletions – upsert streams and retract streams. The main difference is that the upsert stream has an explicit primary key, while the retract stream can contain exact duplicates. Let's define a specific reduction operation for each of these streams and see what would happen if we were to apply it to these particular streams:

  • If the stream is a retract stream, then in addition, simply add the input element to a list and on retraction, find the matching element in the list and remove it.
  • If the stream is an upsert stream, keep the data in a map with a key that's the primary...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Building Big Data Pipelines with Apache Beam
Published in: Jan 2022Publisher: PacktISBN-13: 9781800564930

Author (1)

author image
Jan Lukavský

Jan Lukavský is a freelance big data architect and engineer who is also a committer of Apache Beam. He is a certified Apache Hadoop professional. He is working on open source big data systems combining batch and streaming data pipelines in a unified model, enabling the rise of real-time, data-driven applications.
Read more about Jan Lukavský