Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. 45-Day Plan
  3. Day 40

Day 40 of 45 · Pro lesson

CDC, Debezium & Streaming Joins

The curriculum for this day stays visible. The lesson, code, and workspace unlock with Pro.

Teaches: Change Data Capture (CDC) via database write-ahead log (WAL / binlog), Debezium connector architecture & event envelopes (before, after, op), Out-of-order events & watermark event-time processing, Deduplication & exactly-once processing guarantees, Streaming stateful joins (stream-stream vs stream-table), Changelog table compaction

Build: CDC stream processing engine: PostgreSQL WAL log parser → Debezium event envelope flattener → out-of-order watermark buffer → compacted lakehouse sink.

  • •Complete 15 drills on Debezium envelopes, WAL extraction, watermark windows, and stream deduplication.
  • •Run 6 Python modules simulating out-of-order event arrival, watermark triggers, and log compaction.
  • •Simulate 5 production failures: database WAL disk full from slow consumer, late-arriving event dropped, tombstone loss, and duplicate CDC replays.
  • •Defend 10 senior CDC & streaming questions and complete the blank-page exam.

Never query source databases directly for real-time changes. Read the database WAL via Debezium to avoid impacting transactional query performance.

This section walks through the idea with a short example, then the trade-offs you should mention in an interview.

In practice you start from the raw rows, apply the transform step by step, and check the shape of the result before you move on.

A common mistake is to jump straight to the final query without naming the grain or the join keys that keep the result correct.

Once the core path works, you harden it for nulls, duplicates, and late data so the pipeline stays reliable under load.

The Pro write-up covers the full explanation, worked examples, and the code you can run in the studio.

# Locked example
result = transform(frame)
print(result.head())

Sign in to continue with Pro

Sign in with a Pro account to open the full lesson and in-browser workspace.

Sign in

Already on Pro? Go to your account. Need a pass? See pricing.