Data Modeling Interview Questions: 20 Design Problems with Answers
Twenty scenario-based data modeling problems asked in data engineer and analytics engineer interviews, with what the interviewer is checking and a strong answer for each.
Topic
Dimensional modeling, SCDs, wide tables and modeling for the lakehouse.
Twenty scenario-based data modeling problems asked in data engineer and analytics engineer interviews, with what the interviewer is checking and a strong answer for each.
Identity keys, computed columns and defaults in Delta: what each guarantees, what it doesn't, and the concurrency trade-off that bites.
Three fact table types answer three kinds of question: what happened, what's the position, and how far along is it. Build each on Delta Lake, and avoid summing what shouldn't be summed.
Three modeling styles, three different problems they solve. A decision framework based on source count, audit needs, team size and consumers, plus the hybrid most lakehouses end up with.
Facts that show up before their customer exists, and facts that show up weeks after the event. Inferred members, point-in-time joins and re-keying jobs on Delta Lake, with the trade-offs of each.
Expire the old version and insert the new one in a single Delta MERGE. The staged-union pattern, a PySpark version, the tests that catch broken history, and when to hand it to AUTO CDC.
One customer moves city. Four SCD types record it four different ways. See the rows each type produces, the SQL that writes them, and how to choose per column.
Delta tables didn't make dimensional modeling obsolete. Here's how to pick the grain, split facts from dimensions, and build a star schema on Databricks that analysts can trust.
Identity columns, hash keys and ROW_NUMBER sequences all produce surrogate keys on Delta Lake. They differ on concurrency, collisions, reproducibility and join cost. Here's how to choose.
dbt snapshots give you SCD Type 2 history in about ten lines of config — if you pick the right strategy and understand what they can't do.
Apply a day's customer address changes to a dimension table, closing old versions and inserting new ones, in a single MERGE.
Group raw page views into sessions using a 30-minute inactivity gap, with pure SQL window functions.
Orders can arrive up to 7 days late and finance locks reports after 48 hours. Design the pipeline that keeps both honest.
How to lay out a dbt project that scales past 200 models: staging/intermediate/marts layers, naming, tests, and the refactors to do early.