Skip to content

Commit

Permalink
Merge pull request #302 from dbt-labs/repo-sync
Browse files Browse the repository at this point in the history
REPO SYNC - Public to Private
  • Loading branch information
john-rock authored Nov 13, 2023
2 parents c82eabe + 0cb4856 commit dd80715
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 deletions.
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
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
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>

0 comments on commit dd80715

Please sign in to comment.