Design an incremental load pipeline from a transactional DB to a warehouse

OLTP-to-OLAP sync without full dumps.
Contrast timestamp watermarking, CDC from transaction logs, and open-table incremental reads; cite merge logic and idempotency.
What's really being asked
This question tests whether you can architect a production-grade data movement layer between an OLTP source and an OLAP destination. The interviewer cares about your awareness of consistency boundaries, the ability to reason about mutating data including inserts updates and deletes, and your knowledge of specific incremental patterns beyond naive polling. They also want to see if you consider operational realities like pipeline failures, late-arriving data, and schema changes.
The full answer
A strong answer presents at least two distinct techniques and explicitly weighs their trade-offs. First, timestamp or high-water-mark polling: the pipeline records the maximum modified timestamp from the last successful run and selects rows where the updated_at column exceeds that mark. This is simple but misses deletes, struggles with late-arriving rows, and assumes monotonic clocks. Second, Change Data Capture by reading the database transaction log such as MySQL binlog or PostgreSQL WAL: this captures every mutating event including deletes, preserves ordering, and enables exactly-once semantics when paired with a durable offset store. Third, incremental queries over open table formats such as Apache Hudi or Apache Iceberg: ingest into the lake first, then use Hudi incremental query or Iceberg incremental read to pull only appended or changed files into the warehouse, using a MERGE SQL command in Amazon Redshift to apply upserts. A great candidate also discusses merge logic, idempotency via deterministic job runs, and failure recovery by checkpointing watermarks or offsets outside the pipeline process.
The mistakes people make
The biggest red flag is recommending dual writes, where a single job writes simultaneously to the data lake and the warehouse. This pattern is easy to implement but error-prone because the two transactions are independent; a failure in one creates an inconsistency that is hard to reconcile. Another weak pattern is suggesting a daily full extract without acknowledging the performance cost and network overhead. Candidates also stumble by proposing simple timestamp filters without a plan for out-of-order updates, deleted records, or schema evolution.
What usually comes next
The interviewer may ask how you would handle hard deletes in the source that must be propagated to the warehouse, how you guarantee exactly-once delivery during a job restart, or how you would evolve the schema of the destination table without breaking downstream dashboards. They might also probe the latency trade-off between near-real-time CDC and batch incremental loads, or ask how you would backfill a specific partition after discovering a bug in the transformation logic.
A concrete example
Suppose you are syncing a large orders table into Amazon Redshift. You configure AWS Glue to read the MySQL binlog via CDC, writing change events into S3 as Apache Hudi tables. A subsequent Glue job runs every fifteen minutes, querying Hudi incrementally for all commits since the last checkpoint, then uses the Redshift MERGE command to insert new orders and update changed ones while deleting records marked as removed in the binlog. If the Glue job fails after writing to Redshift but before committing the checkpoint, the next run reuses the same deterministic batch ID, making the MERGE idempotent and preventing duplicates.
Interview question
Which pattern best synchronizes a large OLTP table to a warehouse while correctly handling hard deletes, out-of-order updates, and exactly-once recovery?
- a.Add a deleted_at column to every source table and filter on updated_at, converting hard deletes to updates before extraction
- b.Dual write from the application service to both the OLTP database and the warehouse, retrying warehouse failures asynchronously
- c.Poll the source using an updated_at high watermark and run a daily full extract to reconcile deletes and late arrivals
- d.Capture database change events from the transaction log, stage them in an open-table format, and merge incremental files into the warehouse with checkpointed offsetsCorrect
Why? this is the answer
CDC from the transaction log captures every mutating event including deletes and preserves ordering, while staging in an open-table format enables incremental merge into the warehouse with checkpointed offsets for exactly-once recovery. Dual writes risk inconsistency across independent transactions, and simple timestamp watermarking misses hard deletes and struggles with out-of-order rows unless paired with costly full extracts.
Just read this? Test yourself on what you have been reading.
Read the original → aws.amazon.com
- #data engineering
- #etl
- #cdc
- #incremental loads
- #data warehousing
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on data engineering — each one lists the topics its interview covers.
See open roles