Streaming

Produce, consume, and process streaming data with Kafka-compatible tools, Python, and Flink.

14 lessons · homework closed Mar 8, 2027

Lessons

Units

  1. PyFlink: Stream Processing Workshop

    Introduce the PyFlink streaming workshop that builds a producer, Kafka-compatible broker, consumer, and Flink pipeline into PostgreSQL.

    1 h 33 min
  2. Redpanda - a Kafka-compatible broker

    Start a Redpanda broker in Docker Compose and learn how its internal and external listener addresses work.

  3. Produce messages to Kafka

    Produce taxi ride events from a Python script to a Kafka topic using a dataclass and JSON serializer.

  4. Consume messages with Python

    Consume taxi ride messages from Kafka in Python and deserialize them back into Ride objects.

  5. Save events to PostgreSQL

    Write consumed ride events into a PostgreSQL table with psycopg2 and see the limits of a plain consumer.

  6. Why Flink?

    Explain what Flink adds over a plain consumer, including windowing, checkpointing, parallelism, and connectors.

  7. The Flink image and services

    Build a PyFlink Docker image and define Flink JobManager and TaskManager services in Docker Compose.

  8. The pass-through Flink job

    Submit a Flink pass-through job that reads Kafka with Flink SQL and writes rides to PostgreSQL.

  9. Offsets - earliest vs latest

    Compare Flink startup offset modes, earliest-offset and latest-offset, and see why resubmitting creates duplicates.

  10. Aggregation with tumbling windows

    Count trips and sum revenue per pickup zone in hourly tumbling windows with a Flink job writing to PostgreSQL.

  11. Late events and upserts

    Use watermarks and a primary key upsert so late events correct already published window results in PostgreSQL.

  12. Understanding window types

    Compare tumbling, sliding, and session windows and the kinds of questions each one answers.

  13. Cleanup

    Stop the streaming workshop containers and optionally remove the PostgreSQL data volume.

  14. Q&A

    Answer common questions on Flink job recovery, lateness, streaming versus micro-batch, and production job submission.

Homework

Recordings, code and notes

Optional analytics

Optional analytics are off unless you allow them. Your choice does not affect access to DataTalks.Club, Slack, events, or courses.

Current choice: not chosen.

Privacy Policy

If you allow analytics, self-hosted Umami counts anonymous public pageviews without analytics cookies. Private account and learning pages are excluded. Read the Privacy Policy for the complete data boundary.