From 4dc549822ea8e6e208e2dcb5d83f1be29e8b8c35 Mon Sep 17 00:00:00 2001
From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com>
Date: Wed, 18 Sep 2024 11:11:57 +0100
Subject: [PATCH 1/5] Update saved-queries.md
---
website/docs/docs/build/saved-queries.md | 39 +++++++++++++-----------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/website/docs/docs/build/saved-queries.md b/website/docs/docs/build/saved-queries.md
index e9beffca15f..0cf42f85080 100644
--- a/website/docs/docs/build/saved-queries.md
+++ b/website/docs/docs/build/saved-queries.md
@@ -69,6 +69,26 @@ Use saved queries to define and manage common Semantic Layer queries in YAML, in
In your saved query config, you can also leverage [caching](/docs/use-dbt-semantic-layer/sl-cache) with the dbt Cloud job scheduler to cache common queries, speed up performance, and reduce compute costs.
+
+
+ #### Project-level saved queries
+
+To enable saved queries at the project level, you can set the `saved-queries` configuration in the [`dbt_project.yml` file](/reference/dbt_project.yml). This saves you time in configuring saved queries in each file:
+
+
+
+```yaml
+saved-queries:
+ my_saved_query:
+ config:
+ +cache:
+ enabled: true
+```
+
+
+For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml#naming-convention).
+
+
@@ -102,24 +122,7 @@ saved_queries:
```
-Note, you can set `export_as` to both the saved query and the exports [config](/reference/resource-properties/config), with the exports config value taking precedence. If a key isn't set in the exports config, it will inherit the saved query config value.
-
-#### Project-level saved queries
-
-To enable saved queries at the project level, you can set the `saved-queries` configuration in the [`dbt_project.yml` file](/reference/dbt_project.yml). This saves you time in configuring saved queries in each file:
-
-
-
-```yaml
-saved-queries:
- my_saved_query:
- config:
- +cache:
- enabled: true
-```
-
-
-For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml#naming-convention).
+Note, that you can set `export_as` to both the saved query and the exports [config](/reference/resource-properties/config), with the exports config value taking precedence. If a key isn't set in the exports config, it will inherit the saved query config value.
#### Where clause
From dfb6584370828c0e077b25ff45c31bbf7e36ab02 Mon Sep 17 00:00:00 2001
From: Breezy Fasano
Date: Wed, 18 Sep 2024 11:43:48 -0500
Subject: [PATCH 2/5] Prevent build of rss feeds and throw warning message if
not production
---
website/plugins/buildRSSFeeds/index.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/website/plugins/buildRSSFeeds/index.js b/website/plugins/buildRSSFeeds/index.js
index 5b8d3071708..9911313b217 100644
--- a/website/plugins/buildRSSFeeds/index.js
+++ b/website/plugins/buildRSSFeeds/index.js
@@ -8,13 +8,20 @@ module.exports = function buildRSSFeedsPlugin() {
return {
name: 'docusaurus-build-rss-feeds-plugin',
async loadContent() {
+
+ // Skip generating RSS feeds in non-production environments
+ if (process.env.VERCEL_ENV !== "production") {
+ console.log('RSS Feeds are only generated in production. Skipping creation of RSS Feed.')
+ return null
+ }
+
// Release Notes directory
const releaseNotesDirectory = 'docs/docs/dbt-versions/release-notes'
// Get all files and file data within all release notes directories
const releaseNotesFiles = getDirectoryFiles(releaseNotesDirectory, [], true)
- if(!releaseNotesFiles || !releaseNotesFiles.length)
+ if (!releaseNotesFiles || !releaseNotesFiles.length)
return null
// Generate RSS feeds
From 9c92bbb44a68824a070f11f1ce95d1f0f2965f65 Mon Sep 17 00:00:00 2001
From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com>
Date: Thu, 19 Sep 2024 12:11:52 +0100
Subject: [PATCH 3/5] Update saved-queries.md
---
website/docs/docs/build/saved-queries.md | 40 ++++++++++++------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/website/docs/docs/build/saved-queries.md b/website/docs/docs/build/saved-queries.md
index 0cf42f85080..92afdfa85f4 100644
--- a/website/docs/docs/build/saved-queries.md
+++ b/website/docs/docs/build/saved-queries.md
@@ -69,26 +69,6 @@ Use saved queries to define and manage common Semantic Layer queries in YAML, in
In your saved query config, you can also leverage [caching](/docs/use-dbt-semantic-layer/sl-cache) with the dbt Cloud job scheduler to cache common queries, speed up performance, and reduce compute costs.
-
-
- #### Project-level saved queries
-
-To enable saved queries at the project level, you can set the `saved-queries` configuration in the [`dbt_project.yml` file](/reference/dbt_project.yml). This saves you time in configuring saved queries in each file:
-
-
-
-```yaml
-saved-queries:
- my_saved_query:
- config:
- +cache:
- enabled: true
-```
-
-
-For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml#naming-convention).
-
-
@@ -144,6 +124,26 @@ filter: |
+
+
+#### Project-level saved queries
+
+To enable saved queries at the project level, you can set the `saved-queries` configuration in the [`dbt_project.yml` file](/reference/dbt_project.yml). This saves you time in configuring saved queries in each file:
+
+
+
+```yaml
+saved-queries:
+ my_saved_query:
+ config:
+ +cache:
+ enabled: true
+```
+
+
+For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml#naming-convention).
+
+
From 500614b72f435e7cc456f0a35e3e7373c847cd19 Mon Sep 17 00:00:00 2001
From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com>
Date: Thu, 19 Sep 2024 12:25:20 +0100
Subject: [PATCH 4/5] Update saved-queries.md
---
website/docs/docs/build/saved-queries.md | 40 ++++++++++++------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/website/docs/docs/build/saved-queries.md b/website/docs/docs/build/saved-queries.md
index 92afdfa85f4..91595bde849 100644
--- a/website/docs/docs/build/saved-queries.md
+++ b/website/docs/docs/build/saved-queries.md
@@ -124,26 +124,6 @@ filter: |
-
-
-#### Project-level saved queries
-
-To enable saved queries at the project level, you can set the `saved-queries` configuration in the [`dbt_project.yml` file](/reference/dbt_project.yml). This saves you time in configuring saved queries in each file:
-
-
-
-```yaml
-saved-queries:
- my_saved_query:
- config:
- +cache:
- enabled: true
-```
-
-
-For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml#naming-convention).
-
-
@@ -174,6 +154,26 @@ saved_queries:
+
+
+#### Project-level saved queries
+
+To enable saved queries at the project level, you can set the `saved-queries` configuration in the [`dbt_project.yml` file](/reference/dbt_project.yml). This saves you time in configuring saved queries in each file:
+
+
+
+```yaml
+saved-queries:
+ my_saved_query:
+ config:
+ +cache:
+ enabled: true
+```
+
+
+For more information on `dbt_project.yml` and config naming conventions, see the [dbt_project.yml reference page](/reference/dbt_project.yml#naming-convention).
+
+
To build `saved_queries`, use the [`--resource-type` flag](/reference/global-configs/resource-type) and run the command `dbt build --resource-type saved_query`.
## Configure exports
From 656ccdcced8ef8a4e7b20c9916a2967b2d43608c Mon Sep 17 00:00:00 2001
From: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Date: Thu, 19 Sep 2024 22:59:52 -0400
Subject: [PATCH 5/5] New env variables (#6014)
## What are you changing in this pull request and why?
Adding two new environment variables
## Checklist
- [ ] I have reviewed the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [ ] The topic I'm writing about is for specific dbt version(s) and I
have versioned it according to the [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and/or [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content)
guidelines.
- [ ] I have added checklist item(s) to this list for anything anything
that needs to happen before this PR is merged, such as "needs technical
review" or "change base branch."
---------
Co-authored-by: Ly Nguyen <107218380+nghi-ly@users.noreply.github.com>
---
website/docs/docs/build/environment-variables.md | 15 +++++++++------
website/docs/docs/dbt-versions/release-notes.md | 2 ++
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/website/docs/docs/build/environment-variables.md b/website/docs/docs/build/environment-variables.md
index 01601ce7eb8..8f3c968e50b 100644
--- a/website/docs/docs/build/environment-variables.md
+++ b/website/docs/docs/build/environment-variables.md
@@ -97,7 +97,7 @@ While all environment variables are encrypted at rest in dbt Cloud, dbt Cloud ha
dbt Cloud has a number of pre-defined variables built in. Variables are set automatically and cannot be changed.
-**dbt Cloud IDE details**
+#### dbt Cloud IDE details
The following environment variable is set automatically for the dbt Cloud IDE:
@@ -109,13 +109,16 @@ The following environment variable is set automatically for the dbt Cloud IDE:
Use case — This is useful in cases where you want to dynamically use the Git branch name as a prefix for a [development schema](/docs/build/custom-schemas) ( `{{ env_var ('DBT_CLOUD_GIT_BRANCH') }}` ).
-**dbt Cloud context**
+#### dbt Cloud context
-The following environment variables are set automatically for deployment runs:
+The following environment variables are set automatically:
-- `DBT_ENV`: This key is reserved for the dbt Cloud application and will always resolve to 'prod'
+- `DBT_ENV`: This key is reserved for the dbt Cloud application and will always resolve to 'prod'. For deployment runs only.
+- `DBT_CLOUD_ENVIRONMENT_NAME`: The name of the dbt Cloud environment in which `dbt` is running.
+- `DBT_CLOUD_ENVIRONMENT_TYPE`: The type of dbt Cloud environment in which `dbt` is running. The valid values are `development` or `deployment`.
+
+#### Run details
-**Run details**
- `DBT_CLOUD_PROJECT_ID`: The ID of the dbt Cloud Project for this run
- `DBT_CLOUD_JOB_ID`: The ID of the dbt Cloud Job for this run
- `DBT_CLOUD_RUN_ID`: The ID of this particular run
@@ -124,7 +127,7 @@ The following environment variables are set automatically for deployment runs:
- `DBT_CLOUD_ENVIRONMENT_ID`: The ID of the environment for this run
- `DBT_CLOUD_ACCOUNT_ID`: The ID of the dbt Cloud account for this run
-**Git details**
+#### Git details
_The following variables are currently only available for GitHub, GitLab, and Azure DevOps PR builds triggered via a webhook_
diff --git a/website/docs/docs/dbt-versions/release-notes.md b/website/docs/docs/dbt-versions/release-notes.md
index ca128402743..f3a0c53844e 100644
--- a/website/docs/docs/dbt-versions/release-notes.md
+++ b/website/docs/docs/dbt-versions/release-notes.md
@@ -20,9 +20,11 @@ Release notes are grouped by month for both multi-tenant and virtual private clo
## September 2024
+- **New:** There are two new [environment variable defaults](/docs/build/environment-variables#dbt-cloud-context) — `DBT_CLOUD_ENVIRONMENT_NAME` and `DBT_CLOUD_ENVIRONMENT_TYPE`.
- **New:** The [Amazon Athena warehouse connection](/docs/cloud/connect-data-platform/connect-amazon-athena) is available as a public preview for dbt Cloud accounts that have upgraded to [`versionless`](/docs/dbt-versions/versionless-cloud).
## August 2024
+
- **Fix:** Fixed an issue in [dbt Explorer](/docs/collaborate/explore-projects) where navigating to a consumer project from a public node resulted in displaying a random public model rather than the original selection.
- **New**: You can now configure metrics at granularities at finer time grains, such as hour, minute, or even by the second. This is particularly useful for more detailed analysis and for datasets where high-resolution time data is required, such as minute-by-minute event tracking. Refer to [dimensions](/docs/build/dimensions) for more information about time granularity.
- **Enhancement**: Microsoft Excel now supports [saved selections](/docs/cloud-integrations/semantic-layer/excel#using-saved-selections) and [saved queries](/docs/cloud-integrations/semantic-layer/excel#using-saved-queries). Use Saved selections to save your query selections within the Excel application. The application also clears stale data in [trailing rows](/docs/cloud-integrations/semantic-layer/excel#other-settings) by default. To return your results and keep any previously selected data intact, un-select the **Clear trailing rows** option.