Member-only story
The Most Efficient Way to Organize Dbt Models
Naming conventions, yml files, and folder structures
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.