Skip to content

Commit

Permalink
Merge branch 'current' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewshaver authored Nov 13, 2023
2 parents 5330c3e + accbc41 commit c05c218
Show file tree
Hide file tree
Showing 20 changed files with 79 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ metrics:
Use [MetricFlow commands](/docs/build/metricflow-commands#metricflow) for metric validation or queries during development, and apply the following conventions based on your environment:
- For dbt Cloud, use the `dbt sl` prefix before the command (such as, `dbt sl parse` or `dbt sl query`).
- For dbt Cloud, use the `dbt sl` prefix before the command (such as, `dbt sl query`).
- For dbt Core, use the `mf` prefix (such as `mf validate-configs` or `mf query)`.

Follow these best practices when updating your semantic layer code, using the `mf` command as an example (replace `mf` with `dbt sl` if you're using dbt Cloud):
Expand Down
12 changes: 7 additions & 5 deletions website/docs/docs/build/metricflow-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ Options:

### Validate-configs

This command performs validations against the defined semantic model configurations:
<!--dbt sl validate-configs # In dbt Cloud-->
The following command performs validations against the defined semantic model configurations.

Note, in dbt Cloud you don't need to validate the Semantic Layer config separately. Running a dbt command (such as `dbt parse`, `dbt build`, `dbt compile`, `dbt run`) automatically checks it.

```bash

Expand All @@ -205,11 +206,12 @@ Options:

### Health checks

This command performs a health check against the data platform you provided in the configs:
<!--dbt sl health-checks # In dbt Cloud-->
The following command performs a health check against the data platform you provided in the configs.

Note, in dbt Cloud the `health-checks` command isn't required since it uses dbt Cloud's credentials to perform the health check.

```bash
mf health-checks #in dbt Core
mf health-checks # In dbt Core
```

### Tutorial
Expand Down
13 changes: 3 additions & 10 deletions website/docs/docs/build/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ keywords:
tags: [Metrics]
---

:::caution Upgrade to access MetricFlow and the new dbt Semantic Layer
import DeprecationNotice from '/snippets/_sl-deprecation-notice.md';

The dbt_metrics package has been deprecated and replaced with [MetricFlow](/docs/build/about-metricflow?version=1.6). If you're using the dbt_metrics package or the legacy Semantic Layer (available on v1.5 or lower), we **highly** recommend [upgrading your dbt version](/docs/dbt-versions/upgrade-core-in-cloud) to dbt v1.6 or higher to access MetricFlow and the new [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl?version=1.6).
<DeprecationNotice />

To migrate to the new Semantic Layer, refer to the dedicated [migration guide](/guides/sl-migration) for more info.

:::

<VersionBlock firstVersion="1.6">

Expand All @@ -38,11 +35,7 @@ A metric is an aggregation over a <Term id="table" /> that supports zero or more
- active users
- monthly recurring revenue (mrr)

In v1.0, dbt supports metric definitions as a new node type. Like [exposures](exposures), metrics appear as nodes in the directed acyclic graph (DAG) and can be expressed in YAML files. Defining metrics in dbt projects encodes crucial business logic in tested, version-controlled code. Further, you can expose these metrics definitions to downstream tooling, which drives consistency and precision in metric reporting.

Review the video below to learn more about metrics, why they're important, and how to get started:

<LoomVideo id="b120ca9d042d46abad1d873a676bf20a" />
In v1.0, dbt supports metric definitions as a new node type. Like [exposures](exposures), metrics appear as nodes in the directed acyclic graph (DAG) and can be expressed in YAML files. Defining metrics in dbt projects encodes crucial business logic in tested, version-controlled code. Further, you can expose these metrics definitions to downstream tooling, which drives consistency and precision in metric reporting.

### Benefits of defining metrics

Expand Down
15 changes: 13 additions & 2 deletions website/docs/docs/cloud/about-cloud-develop-defer.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,20 @@ pagination_next: "docs/cloud/cloud-cli-installation"
---


[Defer](/reference/node-selection/defer) is a powerful feature that allows developers to only build and run and test models they've edited without having to first run and build all the models that come before them (upstream parents). This is powered by using a production manifest for comparison, and dbt will resolve the `{{ ref() }}` function with upstream production artifacts.
[Defer](/reference/node-selection/defer) is a powerful feature that allows developers to only build and run and test models they've edited without having to first run and build all the models that come before them (upstream parents). This is powered by using a production manifest for comparison, and dbt will resolve the `{{ ref() }}` function with upstream production artifacts.

Both the dbt Cloud IDE and the dbt Cloud CLI allow users to natively defer to production metadata directly in their development workflows, dramatically reducing development time and warehouse spend by preventing unnecessary model builds.
By default, dbt follows these rules:

- Defers to the production environment when there's no development schema.
- If a development schema exists, dbt will prioritize those changes, which minimizes development time and avoids unnecessary model builds.

Both the dbt Cloud IDE and the dbt Cloud CLI allow users to natively defer to production metadata directly in their development workflows.

For specific scenarios:
- Use [`--favor-state`](/reference/node-selection/defer#favor-state) to always use production artifacts to resolve the ref.
- If facing issues with outdated tables in the development schema, `--favor-state` is an alternative to defer.

For a clean slate, it's a good practice to drop the development schema at the start and end of your development cycle.

## Required setup

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import AvailIntegrations from '/snippets/_sl-partner-links.md';

<VersionBlock lastVersion="1.5">

import LegacyInfo from '/snippets/_legacy-sl-callout.md';
import DeprecationNotice from '/snippets/_sl-deprecation-notice.md';

<LegacyInfo />
<DeprecationNotice />

A wide variety of data applications across the modern data stack natively integrate with the dbt Semantic Layer and dbt metrics &mdash; from Business Intelligence tools to notebooks, data catalogs, and more.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/docs/use-dbt-semantic-layer/dbt-sl.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ plan="dbt Cloud Team or Enterprise"

<VersionBlock lastVersion="1.5">

import LegacyInfo from '/snippets/_legacy-sl-callout.md';
import DeprecationNotice from '/snippets/_sl-deprecation-notice.md';

<LegacyInfo />
<DeprecationNotice />

The dbt Semantic Layer allows your data teams to centrally define essential business metrics like `revenue``customer`, and `churn` in the modeling layer (your dbt project) for consistent self-service within downstream data tools like BI and metadata management solutions. The dbt Semantic Layer provides the flexibility to define metrics on top of your existing models and then query those metrics and models in your analysis tools of choice.

Expand Down
8 changes: 4 additions & 4 deletions website/docs/docs/use-dbt-semantic-layer/gsheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ The dbt Semantic Layer offers a seamless integration with Google Sheets through

## Prerequisites

1. You have a Google account with access to Google Sheets.
2. You can install Google add-ons.
3. You have [set up the dbt Semantic Layer](/docs/use-dbt-semantic-layer/setup-sl).
4. You have a dbt Cloud Environment ID and a [service token](/docs/dbt-cloud-apis/service-tokens) to authenticate with from a dbt Cloud account.
- You have [configured the dbt Semantic Layer](/docs/use-dbt-semantic-layer/setup-sl) and are using dbt v1.6 or higher.
- You have a Google account with access to Google Sheets.
- You can install Google add-ons.
- You have a dbt Cloud Environment ID and a [service token](/docs/dbt-cloud-apis/service-tokens) to authenticate with from a dbt Cloud account.

## Installing the add-on

Expand Down
4 changes: 2 additions & 2 deletions website/docs/docs/use-dbt-semantic-layer/quickstart-sl.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ User data passes through the Semantic Layer on its way back from the warehouse.

<VersionBlock lastVersion="1.5">

import LegacyInfo from '/snippets/_legacy-sl-callout.md';
import DeprecationNotice from '/snippets/_sl-deprecation-notice.md';

<LegacyInfo />
<DeprecationNotice />

To try out the features of the dbt Semantic Layer, you first need to have a dbt project set up. This quickstart guide will lay out the following steps, and recommends a workflow that demonstrates some of its essential features:

Expand Down
4 changes: 2 additions & 2 deletions website/docs/docs/use-dbt-semantic-layer/setup-sl.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import SlSetUp from '/snippets/_new-sl-setup.md';

<VersionBlock lastVersion="1.5">

import LegacyInfo from '/snippets/_legacy-sl-callout.md';
import DeprecationNotice from '/snippets/_sl-deprecation-notice.md';

<LegacyInfo />
<DeprecationNotice />

With the dbt Semantic Layer, you can define business metrics, reduce code duplication and inconsistency, create self-service in downstream tools, and more. Configure the dbt Semantic Layer in dbt Cloud to connect with your integrated partner tool.

Expand Down
4 changes: 4 additions & 0 deletions website/docs/docs/use-dbt-semantic-layer/sl-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ The dbt Semantic Layer is proprietary; however, some components of the dbt Seman

<VersionBlock lastVersion="1.5">

import DeprecationNotice from '/snippets/_sl-deprecation-notice.md';

<DeprecationNotice />

## Product architecture

The dbt Semantic Layer product architecture includes four primary components:
Expand Down
9 changes: 5 additions & 4 deletions website/docs/docs/use-dbt-semantic-layer/tableau.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ This integration provides a live connection to the dbt Semantic Layer through Ta

## Prerequisites

1. You must have [Tableau Desktop](https://www.tableau.com/en-gb/products/desktop) installed with version 2021.1 or greater
- You have [configured the dbt Semantic Layer](/docs/use-dbt-semantic-layer/setup-sl) and are using dbt v1.6 or higher.
- You must have [Tableau Desktop](https://www.tableau.com/en-gb/products/desktop) installed with version 2021.1 or greater
- Note that Tableau Online does not currently support custom connectors natively.
2. Log in to Tableau Desktop using either your license or the login details you use for Tableau Server or Tableau Online.
3. You need your dbt Cloud host, [Environment ID](/docs/use-dbt-semantic-layer/setup-sl#set-up-dbt-semantic-layer) and [service token](/docs/dbt-cloud-apis/service-tokens) to log in. This account should be set up with the dbt Semantic Layer.
4. You must have a dbt Cloud Team or Enterprise [account](https://www.getdbt.com/pricing) and multi-tenant [deployment](/docs/cloud/about-cloud/regions-ip-addresses). (Single-Tenant coming soon)
- Log in to Tableau Desktop using either your license or the login details you use for Tableau Server or Tableau Online.
- You need your dbt Cloud host, [Environment ID](/docs/use-dbt-semantic-layer/setup-sl#set-up-dbt-semantic-layer) and [service token](/docs/dbt-cloud-apis/service-tokens) to log in. This account should be set up with the dbt Semantic Layer.
- You must have a dbt Cloud Team or Enterprise [account](https://www.getdbt.com/pricing) and multi-tenant [deployment](/docs/cloud/about-cloud/regions-ip-addresses). (Single-Tenant coming soon)


## Installing
Expand Down
4 changes: 3 additions & 1 deletion website/docs/reference/analysis-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
title: Analysis properties
---

We recommend you define analysis properties in your `analyses/` directory, which is illustrated in the [`analysis-paths`](/reference/project-configs/analysis-paths) configuration.
import PropsCallout from '/snippets/_config-prop-callout.md';

We recommend you define analysis properties in your `analyses/` directory, which is illustrated in the [`analysis-paths`](/reference/project-configs/analysis-paths) configuration. <PropsCallout title={frontMatter.title}/> <br />

You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `analyses/` or `models/` directory.

Expand Down
6 changes: 5 additions & 1 deletion website/docs/reference/exposure-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ description: "Read this guide to understand exposure properties in dbt."
- [Declaring resource properties](/reference/configs-and-properties)

## Overview
Exposures are defined in `.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define define `sources` or `models`.

import PropsCallout from '/snippets/_config-prop-callout.md';

Exposures are defined in `properties.yml` files nested under an `exposures:` key. You may define `exposures` in YAML files that also define `sources` or `models`. <PropsCallout title={frontMatter.title}/> <br />


You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory.

Expand Down
7 changes: 5 additions & 2 deletions website/docs/reference/macro-properties.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
title: Macro properties
id: macro-properties
---

Macro properties can be declared in `.yml` files.
import PropsCallout from '/snippets/_config-prop-callout.md';

You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders.
Macro properties can be declared in any `properties.yml` file. <PropsCallout title={frontMatter.title}/>

You can name these files `whatever_you_want.yml` and nest them arbitrarily deep in sub-folders.

<File name='macros/<filename>.yml'>

Expand Down
2 changes: 2 additions & 0 deletions website/docs/reference/resource-configs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ macros:
show: true | false
```
</File>
Also refer to [macro properties](/reference/macro-properties).
</TabItem>
</Tabs>
Expand Down
8 changes: 6 additions & 2 deletions website/docs/reference/source-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ description: "Learn how to use source properties in dbt."
- [Declaring resource properties](/reference/configs-and-properties)

## Overview
Source properties can be declared in `.yml` files in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)).

You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory.
import PropsCallout from '/snippets/_config-prop-callout.md';

Source properties can be declared in any `properties.yml` file in your `models/` directory (as defined by the [`model-paths` config](/reference/project-configs/model-paths)). <PropsCallout title={frontMatter.title}/> <br />


You can name these files `whatever_you_want.yml`, and nest them arbitrarily deeply in subfolders within the `models/` directory:

<File name='models/<filename>.yml'>

Expand Down
1 change: 1 addition & 0 deletions website/snippets/_config-prop-callout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span>{props.title} are "special properties" in that you can't configure them in the <code>dbt_project.yml</code> file or using <code>config()</code> blocks. Refer to <a href="https://docs.getdbt.com/reference/configs-and-properties#which-properties-are-not-also-configs" target="_self"> Configs and properties</a> for more info.</span>
10 changes: 4 additions & 6 deletions website/snippets/_legacy-sl-callout.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
:::important Upgrade to access the new dbt Semantic Layer
:::important Upgrade to access the latest dbt Semantic Layer

The dbt Semantic Layer has undergone a [significant revamp](https://www.getdbt.com/blog/dbt-semantic-layer-whats-next/), improving governance, introducing a new API, and making it more efficient to define and query metrics. The legacy Semantic Layer, available in dbt v1.5 or lower, is no longer supported and won't receive any code fixes.
The dbt Semantic Layer has undergone a [significant revamp](https://www.getdbt.com/blog/dbt-semantic-layer-whats-next/), introducing new features such as dbt Semantic Layer APIs. The APIs integrate with data applications, such as Tableau and Google Sheets, to query metrics and unlock insights.

**Who does this affect?** Anyone who uses the legacy Semantic Layer. The new Semantic Layer is available to [Team or Enterprise](https://www.getdbt.com/pricing/) multi-tenant dbt Cloud plans [hosted in North America](/docs/cloud/about-cloud/regions-ip-addresses) (more regions coming soon). You must be on dbt v1.6 or higher to access it. Users on dbt Cloud Developer plans or dbt Core users can use MetricFlow to only define and test metrics locally.
For users of the dbt Semantic Layer on version 1.5 or lower &mdash; Support for dbt Metrics and the legacy dbt Semantic Layer ends on December 15th, 2023. To access the latest features, migrate to the updated version using the [dbt Semantic Layer migration guide](/guides/sl-migration).

**What’s changed?** The dbt_metrics package has been [deprecated](https://docs.getdbt.com/blog/deprecating-dbt-metrics) and replaced with [MetricFlow](/docs/build/about-metricflow?version=1.6), a new framework for defining metrics in dbt. This means dbt_metrics is no longer supported after dbt v1.5 and won't receive any code fixes.

**What should you do?** If you're using the legacy Semantic Layer, we **highly** recommend you [upgrade your dbt version](/docs/dbt-versions/upgrade-core-in-cloud) to dbt v1.6 or higher to use the new dbt Semantic Layer. To migrate to the new Semantic Layer, refer to the dedicated [migration guide](/guides/sl-migration) for more info.
After December 15th, dbt Labs will no longer support these deprecated features, they will be removed from the dbt Cloud user interface, and their documentation removed from the docs site.

:::
7 changes: 7 additions & 0 deletions website/snippets/_sl-deprecation-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:::info Deprecation of dbt Metrics and the legacy dbt Semantic Layer
For users of the dbt Semantic Layer on version 1.5 or lower &mdash; Support for dbt Metrics and the legacy dbt Semantic Layer ends on December 15th, 2023. To access the latest features, migrate to the updated version using the [dbt Semantic Layer migration guide](/guides/sl-migration).


After December 15th, dbt Labs will no longer support these deprecated features, they will be removed from the dbt Cloud user interface, and their documentation removed from the docs site.

:::
2 changes: 1 addition & 1 deletion website/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
},
{
"source": "/guides/orchestration/set-up-ci/lint-on-push",
"destination": " /guides/set-up-ci",
"destination": "/guides/set-up-ci",
"permanent": true
},
{
Expand Down

0 comments on commit c05c218

Please sign in to comment.