Skip to content

Boards in a separate repo

dbt Charts expects dbt_project.yml next to dbt_charts.yml by default. If your boards live somewhere else, a repository of their own or a sibling folder in a monorepo, point dbt Charts at the dbt project with one key:

# dbt_charts.yml
dbt_project_dir: ../my_dbt_project

The path is relative to dbt_charts.yml. A layout with two repositories checked out side by side looks like this:

work/
├── my_dbt_project/        # the dbt repo
│   ├── dbt_project.yml
│   ├── profiles.yml       # optional; ~/.dbt/profiles.yml also works
│   └── target/manifest.json
└── my_boards/             # the boards repo
    ├── dbt_charts.yml     # dbt_project_dir: ../my_dbt_project
    └── charts/

What dbt Charts reads from the dbt project

dbt Charts never runs dbt. From the linked directory it reads:

  • dbt_project.yml, for the profile name
  • target/manifest.json, to resolve {{ ref() }} and {{ source() }}. Run dbt parse (or any build) in the dbt project first so it exists.
  • profiles.yml, when your source is type: dbt_profile. See dbt Profile Sources for the full lookup order.

Setting it per machine instead

Paths differ between laptops and CI. Instead of committing dbt_project_dir:, you can set it per shell or per command. The first one set wins:

  1. --dbt-project-dir PATH on the command
  2. DBT_PROJECT_DIR, the same variable dbt itself reads
  3. dbt_project_dir: in dbt_charts.yml
export DBT_PROJECT_DIR=~/work/my_dbt_project
dct validate

A path that does not exist, or names a file instead of a folder, is an error. dbt Charts does not fall back to looking next to dbt_charts.yml.

In CI

Check out both repositories, run dbt parse in the dbt one, and point dbt Charts at it. With GitHub Actions, check out the dbt repo into a subfolder using actions/checkout with repository: and path:, then set DBT_PROJECT_DIR to that path. Validating Boards in CI covers the rest of the workflow.