As asked
You inherit a dbt project with 200 models and no consistent structure. How would you reorganise it?
Sample answer outline
Standard layering: staging (one-to-one with source tables, light renaming and casting), intermediate (joins and reshaping, no business logic), marts (business-facing, one row per business concept). Group marts by domain (finance, marketing, product) not by source. Name models predictably: stg_, int_, fct_, dim_. Tag models for selection in CI and prod. Document at the model and column level so the warehouse is browsable. Enforce structure with project linters (dbt-project-evaluator). Migrate the existing 200 models in waves, not all at once.
Expect these follow-ups
- How do you handle a one-off analytics question that does not fit any mart?
- What is your testing strategy: every model or just marts?
- When is a model worth materialising as a table vs a view?