Skip to content

Commit

Permalink
Clarify order of precedence for global configs (#4363)
Browse files Browse the repository at this point in the history
[Preview](https://docs-getdbt-com-git-dbeatty-global-configs-prec-329ad4-dbt-labs.vercel.app/reference/global-configs/about-global-configs)

resolves #4362

## What are you changing in this pull request and why?

Two things:
1. When quickly scanning docs, make it easy to see the order of
precedence for global configs
1. Include hyperlinks to the three different ways that a global config
can be set ([user
config](https://docs.getdbt.com/reference/global-configs/yaml-configurations),
[environment
variable](https://docs.getdbt.com/reference/global-configs/environment-variable-configs),
[CLI
flag](https://docs.getdbt.com/reference/global-configs/command-line-flags))

### History


[This](https://github.com/dbt-labs/docs.getdbt.com/blob/35a59491ffc6133a26e0c52b9a8e9a3f96d405f3/website/docs/reference/global-configs/about-global-configs.md)
is the current page for "Global Configs", and
[this](https://github.com/dbt-labs/docs.getdbt.com/blob/533637af17b296e17a19eb4582da0123ddc8b572/website/docs/reference/global-configs.md)
was the page prior to
#3332.

### 🎩 

<img width="450" alt="image"
src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/2f9657a8-ab70-456e-8cb6-29d7030d1cbb">


## Checklist
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [x] I have verified the preview renders correctly
- [x] I have verified any new links work correctly

---------

Co-authored-by: Matt Shaver <[email protected]>
  • Loading branch information
dbeatty10 and matthewshaver authored Oct 30, 2023
1 parent b1a2442 commit 6b64e06
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ Global configs enable you to fine-tune _how_ dbt runs projects on your machine

Global configs control things like the visual output of logs, the manner in which dbt parses your project, and what to do when dbt finds a version mismatch or a failing model. These configs are "global" because they are available for all dbt commands, and because they can be set for all projects running on the same machine or in the same environment.

Starting in v1.0, you can set global configs in three places. When all three are set, command line flags take precedence, then environment variables, and last yaml configs (usually `profiles.yml`).
### Global config precedence

Starting in v1.0, you can set global configs in three places. dbt will evaluate the configs in the following order:
1. [user config](https://docs.getdbt.com/reference/global-configs/yaml-configurations)
1. [environment variable](https://docs.getdbt.com/reference/global-configs/environment-variable-configs)
1. [CLI flag](https://docs.getdbt.com/reference/global-configs/command-line-flags)

Each config is prioritized over the previous one. For example, if all three are provided, then the CLI flag takes precedence.

0 comments on commit 6b64e06

Please sign in to comment.