Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Project structure · Data and DevOps

dbt project project structure

Opens with credits

A dbt project that turns raw tables into tested, documented models, using the staging, intermediate and marts layers from dbt's own structure guide. It runs on DuckDB on your laptop, so you can learn analytics engineering for free, and grows into a governed project with checks, contracts, slim CI and a hosted docs site that moves to BigQuery or Snowflake unchanged.

Curated by Tauseef FayyazIntermediate144 files and foldersdbt 2.0 (Rust engine, GA September 2026), DuckDBChecked October 2026
Explore the filesPick any file to see what it is, why it exists and when you add it.

How it grows

Each stage opens the explorer there

  1. 1Day 1What the scaffold and your first hour give you47 files and folders
  2. 2GrowingWhat a real app with features and tests adds+46 files and folders
  3. ProductionWhat running it for real users adds+27 files and foldersOpens with credits
  4. ExpertWhat a team needs to keep it healthy for years+24 files and foldersOpens with credits

How it is organised

  • Three layers, each with one job. Staging: one model per source table, renamed and cast, nothing joined. Intermediate: reusable steps that join or aggregate. Marts: the tables people query, one row per business entity.
  • Data only flows forward: marts ref intermediate or staging models, staging models ref sources or seeds. A staging model never refs a mart.
  • Every model gets a YAML file next to it with a description and tests. At minimum, the primary key is unique and not_null.
  • Use ref() and source() for every table, never a hard-coded schema name, so dbt knows the dependency graph and can build into any environment.
  • Name files so they explain themselves: stg_[source]__[entity]s, int_[entity]s_[verb]s, and plain business names (orders, customers) in marts.
  • Group marts by business area (finance/, marketing/) once there are more than a handful; a single-team project can stay flat, as the dbt sample does.
  • Test at three levels: unit tests prove the SQL logic on hand-written rows, data tests check the real data on every run, and checks (dbt v2) enforce project rules such as "every public model has an owner" before anything runs.
  • Governance comes last. Groups, access, contracts and model versions make changes slower on purpose, so add them when other teams or dashboards depend on a model, not on day one.
  • dbt v2 supports Snowflake, BigQuery, Databricks, Redshift and DuckDB. On Postgres or another warehouse, use dbt-core 1.x with its adapter: the layout is the same.

At the top of the project

Open one in the explorer for the full story

Learn more on Sefism

Roadmaps, cheat sheets and projects that go with dbt project.

See 9 more
Checked against 16 official sources, October 2026. If something has changed, the docs win.Show sources

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com