▶ Interactive Lab

Stream-Table Duality

Watch a stream of updates fold into a table view.

Advertisement
Each event updates a row in the materialized table view. Same data, two views.

What you're seeing

Stream = unbounded sequence of (key, value, ts) events. Table = current value per key (folded from stream). Materialized table view is the result of applying every event in order.

Kafka Streams KTable, Flink SQL CREATE TABLE — same idea. The duality lets you switch between views as the problem demands.

★ KEY TAKEAWAY
Stream of updates → table view (latest per key). Same data, two views — the foundation of Kafka Streams and Flink SQL.
▶ WHAT TO TRY
  • Click Emit next event a few times.
  • Left grows forever (stream). Right shows latest per key (table view).