Jack C
Apr 28, 2023

Hi Stefan,

So you're correct on subfolders - 1 dbt project with folders like models/finance/stg/x.sql or models/sales/intermediate/x.sql.

Sub projects is where you import dbt packages (other projects) and use models from them:

- You'd specify, in your packages.yml file, the package names (and versions if applicable). Example here

- You would install these packages via `dbt deps` which would then be stored in your `packages/` folder

- Each package is a dbt project in it's own right! You can specify the package name in your `ref` - e.g. {{ ref('other_package', 'model_name') }} if you want to be explicit about where the model comes from, more detail here

In short, the sub project approach would involve having multiple Git repositories, each with their own dbt project. More docs here

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Jack C
Jack C

Written by Jack C

I write about Data Analytics and Analytics Engineering

Responses (1)

Write a response