Sitemap
TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Member-only story

The Most Efficient Way to Organize Dbt Models

7 min readNov 24, 2021

--

Photo by @shawnanggg on Unsplash

Dbt is a hot tool in the analytics world, and it only continues to become more and more popular. It is used by analysts and analytics engineers alike to run modular code in a way that is faster and more dependable.

Organization is a key component of using dbt in a way that is effective for your team. It is only as useful as how organized your dbt project structure is.

This can be quite intimidating for those that have never used dbt. Luckily, the team behind this tool has thoroughly documented the structure they use for their personal clients.

While I used their structure as a guide to build my models, a lot of the organization depends on your own use cases and the teams you are supporting.

One system does not fit all. It is very much an art of figuring out what works best for your analytics team.

Folder Structure

The team at dbt recommends organizing your models into two different folders- staging and marts.

Staging models are those that read from a raw data file and involve data cleaning. Sometimes joins and more involved transformations are required.

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Madison Schott
Madison Schott

Written by Madison Schott

Analytics Engineer @ ConvertKit, author of the Learn Analytics Engineering newsletter and The ABCS of Analytics Engineering ebook, health & wellness enthusiast