Data Engineering interview question · Most asked
Design a daily pipeline that loads orders from an operational database into a warehouse for analytics.
Design Asked in Data Engineer · Machine Learning Engineer interviews
Summary
Extract incrementally (change data capture or updated_at watermarks) into a raw landing zone, load into the
warehouse, and transform with versioned SQL models (staging → cleaned → business marts) using a tool such as dbt,
orchestrated by Airflow or Dagster. Make every step idempotent, test data quality, and alert on freshness and
failures.
Longer Answer
- Extract: CDC (Debezium, Fivetran, AWS DMS) catches updates and deletes; watermark queries are simpler but miss hard deletes.
- Land raw data unchanged (Parquet in object storage or raw tables) so you can replay.
- Transform: incremental models with
MERGEkeyed on order ID; slowly changing dimensions for customers. - Idempotency: re-running a day replaces that day's partition instead of appending duplicates.
- Quality: tests for uniqueness, not-null, accepted values, referential integrity, row-count anomalies.
- Operations: backfills by date range, lineage, SLAs on freshness, cost monitoring.
Key Points
- Incremental extract: CDC or watermarks.
- Land raw data for replay.
- Layered, versioned transformations.
- Idempotent partitions and MERGE.
- Data tests, freshness alerts, backfills.
Explanation
What interviewers look for
A layered, idempotent, testable design with operational concerns covered.
More Data Engineering questions
- Scenario: warehouse revenue is 4% higher than the payment provider's settlements. How do you investigate?
- How do you deduplicate events, and what does 'exactly-once' really mean?
- What is dbt, and what problems does it solve?
- How do you monitor data pipelines beyond job success?
- What is a star schema, and why is it used in data warehouses?
- Explain slowly changing dimensions, especially Type 1 and Type 2.
- What is change data capture (CDC), and why is log-based CDC preferred over polling?
- What is the difference between ETL and ELT, and when would you choose each?