GuideIntermediate

Streaming With Kafka And Flink

This guide opens by proving, with real code, the most expensive and best-documented mistake in streaming: recomputing in Kafka+Flink the exact same session funnel Kiosko already calculated in batch — and landing on the identical `35.3%`, with more infrastructure and zero new value. From that proof, the guide draws the real line: streaming earns its cost on the handful of problems batch, by design, cannot solve, no matter how much you optimize it. Running Apache Kafka (4.x, KRaft mode, $0 locally) and Apache Flink/PyFlink for real in Docker, you solve four concrete Kiosko problems: detecting in minutes that a store stopped reporting (the star case, against a daily DAG that wouldn't notice until tomorrow), capturing a price change straight from Postgres's write-ahead log with Debezium (CDC) instead of hand-declaring it in Python, building event-time windows with watermarks over a continuous stream, and keeping incremental state without re-summing the entire history on every run. The guide is honest about Flink's market gap and answers it with fresh evidence (Kafka's salary premium, ~33% of UK senior streaming roles) without overstating Flink's role beyond what Kiosko genuinely needs.

64
lessons
8
modules
English · Spanish
available in
Yes
certificate
Free
access
NIEVA

Outcomes

What you'll be able to do

  • Reproduce in Kafka+Flink the same `page_view → add_to_cart → purchase` funnel a batch pipeline already computed, and verify it lands on the same result — the empirical proof of when streaming adds NO value
  • Install Kafka in KRaft mode with Docker (no ZooKeeper) and PyFlink locally, $0, no cloud account
  • Explain topics, partitions, and offsets as the real unit of order and parallelism, and choose a Python Kafka client with criteria
  • Build a deterministic, finite producer and consumer that turn fixed order files into a real stream, verifying the same known total
  • Distinguish processing time from event time, and use watermarks to deterministically close tumbling windows over `order_ts`
  • Contrast a tumbling window (recomputable) with keyed incremental state (a running total that never re-sums the full history)
  • Detect live, with a session window that closes on silence, that a store stopped reporting — and quantify the contrast in minutes against a daily DAG
  • Capture a real Postgres `UPDATE` with Debezium (CDC) and apply it with `upsert()` to an existing Iceberg table, closing the bridge between the transactional system and the warehouse
  • Tell apart infrastructure metadata that isn't reproducible (Kafka/Debezium offsets, timestamps) from the business content that is

Before you start

What you need to bring

It's for you if...

  • Data engineers who need to know, with evidence rather than trend-chasing, when a problem genuinely needs streaming and when it's batch in disguise
  • Teams evaluating Kafka for use cases where latency IS the product (operational alerts, fraud, syncing with a transactional system)
  • Anyone preparing for senior data engineering roles where Kafka/Flink already show up as a hard requirement, especially in fintech and logistics
  • Data engineers who completed `lakehouse-and-iceberg-guide` and want to close the CDC thread that guide left named but unbuilt

Requirements and materials

  • Intermediate Python; comfortable with the command line and Docker/Docker Compose
  • Ideally completed `lakehouse-and-iceberg-guide` (the Iceberg `dim_product` table the CDC module feeds) and `dbt-analytics-engineering-guide` (the session funnel Module 1 recomputes)
  • Docker installed and running locally (Kafka, plus Postgres + Debezium only in the CDC modules)

Content

The syllabus, module by module

Open any of them to see its lessons.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!