Start here
You often need to copy a table from an app database into the warehouse. This chapter uses one interview prompt: get orders from Postgres into the warehouse. The warehouse may be at most five minutes behind.
Change data capture (CDC) means you capture each change to a table as its own event. The change can be an insert, an update, or a delete.
What you already know
- An incremental load reads the rows where updated_at is newer than a watermark.
- A merge (upsert) updates a row if it exists and inserts it if not. Running it twice gives the same result.
- Batch jobs run on a schedule. A stream handles events one by one, as they arrive.
- From week 8: checks before publish, schema changes, and data contracts.
What you will learn
- What a watermark query cannot see.
- Three ways to capture changes.
- How the database log gives you change events.
- How to pick the right event when events arrive late or twice.
- How to apply events with MERGE.
- How to do the first load, then keep going with the stream.
- What happens when the table changes.
- When CDC is too much.
We use the shop. Some changes on 2026-01-22 are made up for the examples. Each section says so.
