liveBook · Manning

Streaming table

As explained in Kafka for Architects

A stream-processing table is a view that retains the latest value associated with each key rather than treating every update as an independent event.

A streaming table retains the latest value for each key instead of treating every update as a separate event. In an order-processing architecture, customer data can therefore serve as a current lookup view while orders remain an event stream. section 8.3.6

A stream-table join behaves differently from a stream-to-stream join:

  • An incoming order triggers a lookup against the current customer value. section 8.3.6
  • A matching key produces an aggregated result; an absent key produces no output. section 8.3.6
  • Updating the customer table does not reprocess orders that were already processed. section 8.3.6

Orders with current customer data

Treat payments and orders as streams when their events must meet within a time window. Treat customer data as a table when each order needs only the latest customer value. Matching keys must be processed together, typically through copartitioning; a GlobalKTable can instead broadcast the dataset for read-only lookups without partitioning constraints. section 8.3.6

Figure 8.13 Partitions with the same index are assigned to the same task, and this assignment remains fixed. Elements in input topics that arrive in partitions with the same index will be processed together.
A group of rectangular white rectangular objects with black text

Description automatically generated

Use the partition-assignment diagram to see why matching keys and aligned partitions keep related records in the same processing task. section 8.3.6

How Kafka for Architects covers it

How deep it goes
Explains latest-value semantics, lookup triggers, non-reprocessing, copartitioning, and GlobalKTable, while deferring advanced join types.
Examples
Uses customer data joined with orders, contrasted with payment and order stream-to-stream joins.
What it assumes
Requires understanding streams, keys, partitions, and joins while distinguishing current table state from individual events.
What you can do after
Apply it via Kafka Streams to look up customer data for incoming orders with aligned keys and partitions.
How it connects
Connects streaming tables to stream-table joins, keys, partitions, copartitioning, state stores, and GlobalKTable.

Also explained in

Compare how 2 books explain streaming table →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.