From 34b40e9a20382cf0d2f36372b241ad08d30555fb Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Sat, 28 Oct 2023 12:23:12 -0600 Subject: [PATCH 1/3] Clarify order of precedence for global configs --- .../reference/global-configs/about-global-configs.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/website/docs/reference/global-configs/about-global-configs.md b/website/docs/reference/global-configs/about-global-configs.md index 42819cdac8f..4daaec36aa8 100644 --- a/website/docs/reference/global-configs/about-global-configs.md +++ b/website/docs/reference/global-configs/about-global-configs.md @@ -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`). \ No newline at end of file +### Global config precedence + +Starting in v1.0, you can set global configs in three places. dbt will pick the config in the following order (lower takes priority): +1. [user config](https://docs.getdbt.com/docs/core/connect-data-platform/profiles.yml#user-config) +1. [environment variable](https://docs.getdbt.com/reference/global-configs/environment-variable-configs) +1. [CLI flag](https://docs.getdbt.com/reference/global-cli-flags) + +i.e., if all three are provided, then the CLI flag takes precedence. From 34df641a18b02849e77a741aa7943162f4e11381 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Sun, 29 Oct 2023 10:38:06 -0600 Subject: [PATCH 2/3] Update links for YAML user configs and CLI flags --- website/docs/reference/global-configs/about-global-configs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/global-configs/about-global-configs.md b/website/docs/reference/global-configs/about-global-configs.md index 4daaec36aa8..fa25d27059e 100644 --- a/website/docs/reference/global-configs/about-global-configs.md +++ b/website/docs/reference/global-configs/about-global-configs.md @@ -11,8 +11,8 @@ Global configs control things like the visual output of logs, the manner in whic ### Global config precedence Starting in v1.0, you can set global configs in three places. dbt will pick the config in the following order (lower takes priority): -1. [user config](https://docs.getdbt.com/docs/core/connect-data-platform/profiles.yml#user-config) +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-cli-flags) +1. [CLI flag](https://docs.getdbt.com/reference/global-configs/command-line-flags) i.e., if all three are provided, then the CLI flag takes precedence. From 92cb790c2ccd7ff676e77be8d3ce4d2996c300a1 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:41:44 -0600 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com> --- website/docs/reference/global-configs/about-global-configs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/reference/global-configs/about-global-configs.md b/website/docs/reference/global-configs/about-global-configs.md index fa25d27059e..9d1691812b5 100644 --- a/website/docs/reference/global-configs/about-global-configs.md +++ b/website/docs/reference/global-configs/about-global-configs.md @@ -10,9 +10,9 @@ Global configs control things like the visual output of logs, the manner in whic ### Global config precedence -Starting in v1.0, you can set global configs in three places. dbt will pick the config in the following order (lower takes priority): +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) -i.e., if all three are provided, then the CLI flag takes precedence. +Each config is prioritized over the previous one. For example, if all three are provided, then the CLI flag takes precedence.