-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cloud cli docs with windows, new instructions (#4172)
Added the latest, feel free to change! Changes are still being added by product team so not ready to fully merge into mega branch yet merging into #4191 [ ] needs docs review
Showing
41 changed files
with
525 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Using defer in dbt Cloud | ||
id: about-cloud-develop-defer | ||
description: "Learn how to leverage defer to prod when developing with dbt Cloud." | ||
sidebar_label: "Using defer in dbt Cloud" | ||
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. | ||
|
||
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. | ||
|
||
## Required setup | ||
|
||
- You must select the **[Production environment](/docs/deploy/deploy-environments#set-as-production-environment-beta)** checkbox in the **Environment Settings** page. | ||
- This can be set for one deployment environment per dbt Cloud project. | ||
- You must have a successful job run first. | ||
|
||
When using 'defer', it compares artifacts from the most recent successful production job, excluding CI jobs. | ||
|
||
### Defer in the dbt Cloud IDE | ||
|
||
To enable 'Defer' in the dbt Cloud IDE, toggle the **Defer to production** button on the command bar. Once enabled, dbt Cloud will: | ||
|
||
1. Pull down the most recent manifest from the Production environment for comparison | ||
2. Pass the `--defer` flag to the command (for any command that accepts the flag) | ||
|
||
For example, if you were to start developing on a new branch with [nothing in your development schema](/reference/node-selection/defer#usage), edit a single model, and run `dbt build -s state:modified` — only the edited model would run. Any `{{ ref() }}` functions will point to the production location of the referenced models. | ||
|
||
<Lightbox src="/img/docs/dbt-cloud/defer-toggle.jpg" width="100%" title="Select the 'Defer to production' toggle on the botom right of the command bar to enable defer in the dbt Cloud IDE."/> | ||
|
||
### Defer in dbt Cloud CLI | ||
|
||
One key difference between using `--defer` in the dbt Cloud CLI and the dbt Cloud IDE is that `--defer` is *automatically* enabled in the dbt Cloud CLI for all invocations, comparing with production artifacts. You can disable it with the `--no-defer` flag. | ||
|
||
The dbt Cloud CLI offers additional flexibility by letting you choose the source environment for deferral artifacts. You can set a `defer-env-id` key in either your `dbt_project.yml` or `dbt_cloud.yml` file. If you do not provide a `defer-env-id` setting, the dbt Cloud CLI will use artifacts from your dbt Cloud environment marked 'Production'. | ||
|
||
<File name="dbt_cloud.yml"> | ||
|
||
```yml | ||
dever-env-id: '123456' | ||
``` | ||
</File> | ||
<File name="dbt_project.yml"> | ||
```yml | ||
dbt_cloud: | ||
dever-env-id: '123456' | ||
``` | ||
</File> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: About developing in dbt Cloud | ||
id: about-cloud-develop | ||
description: "Learn how to develop your dbt projects using dbt Cloud." | ||
sidebar_label: "About developing in dbt Cloud" | ||
pagination_next: "docs/cloud/cloud-cli-installation" | ||
hide_table_of_contents: true | ||
--- | ||
|
||
dbt Cloud offers a fast and reliable way to work on your dbt project. It runs dbt Core in a hosted (single or multi-tenant) environment. You can develop in your browser using an integrated development environment (IDE) or in a dbt Cloud-powered command line interface (CLI): | ||
|
||
<div className="grid--2-col" > | ||
|
||
<Card | ||
title="dbt Cloud CLI" | ||
body="Allows you to develop and run dbt commands from your local command line or code editor against your dbt Cloud development environment." | ||
link="/docs/cloud/cloud-cli-installation" | ||
icon="dbt-bit"/> | ||
|
||
<Card | ||
title="dbt Cloud IDE" | ||
body="Develop directly in your browser, making dbt project development efficient by compiling code into SQL and managing project changes seamlessly using an intuitive user interface." | ||
link="/docs/cloud/dbt-cloud-ide/develop-in-the-cloud" | ||
icon="dbt-bit"/> | ||
|
||
</div><br /> | ||
|
||
The following sections provide detailed instructions on setting up the dbt Cloud CLI and dbt Cloud IDE. To get started with dbt development, you'll need a [developer](/docs/cloud/manage-access/seats-and-users) account. For a more comprehensive guide about developing in dbt, refer to our [quickstart guides](/quickstarts). | ||
|
||
|
||
--------- | ||
**Note**: The dbt Cloud CLI and the open-sourced dbt Core are both command line tools that let you run dbt commands. The key distinction is the dbt Cloud CLI is tailored for dbt Cloud's infrastructure and integrates with all its [features](/docs/cloud/about-cloud/dbt-cloud-features). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.