Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cloud cli video and alias info #4320

Merged
merged 22 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
953d748
adding steve's video
mirnawong1 Oct 24, 2023
a3894dc
Update website/docs/docs/cloud/cloud-cli-installation.md
mirnawong1 Oct 24, 2023
968b19b
Merge branch 'current' into mwong-add-cloud-cli-loom
mirnawong1 Oct 24, 2023
640e758
Update website/docs/docs/cloud/cloud-cli-installation.md
mirnawong1 Oct 24, 2023
2228037
Update website/docs/docs/cloud/cloud-cli-installation.md
mirnawong1 Oct 24, 2023
c8e066a
Update website/docs/docs/cloud/cloud-cli-installation.md
mirnawong1 Oct 24, 2023
9f814f9
Merge branch 'current' into mwong-add-cloud-cli-loom
matthewshaver Oct 24, 2023
7656855
Update cloud-cli-installation.md
mirnawong1 Oct 25, 2023
f58614c
Update cloud-cli-installation.md
mirnawong1 Oct 25, 2023
c3f50c9
rephrase
mirnawong1 Oct 25, 2023
5c8e41e
Merge branch 'current' into mwong-add-cloud-cli-loom
mirnawong1 Oct 25, 2023
7bd3568
fold in feedback
mirnawong1 Oct 25, 2023
cd98958
Merge branch 'mwong-add-cloud-cli-loom' of https://github.com/dbt-lab…
mirnawong1 Oct 25, 2023
7a38dbd
Update website/docs/docs/cloud/cloud-cli-installation.md
mirnawong1 Oct 25, 2023
3ca3da3
add colon
mirnawong1 Oct 25, 2023
2aa518b
Merge branch 'mwong-add-cloud-cli-loom' of https://github.com/dbt-lab…
mirnawong1 Oct 25, 2023
4868ae8
Merge branch 'current' into mwong-add-cloud-cli-loom
mirnawong1 Oct 25, 2023
736868a
Update cloud-cli-installation.md
mirnawong1 Oct 25, 2023
54f5b14
tweak video callout
mirnawong1 Oct 25, 2023
6590e98
Merge branch 'current' into mwong-add-cloud-cli-loom
mirnawong1 Oct 25, 2023
504090f
Update website/docs/docs/cloud/cloud-cli-installation.md
mirnawong1 Oct 25, 2023
39231c9
Merge branch 'current' into mwong-add-cloud-cli-loom
mirnawong1 Oct 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 72 additions & 32 deletions website/docs/docs/cloud/cloud-cli-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,65 @@ dbt commands are run against dbt Cloud's infrastructure and benefit from:
* [Automatic deferral](/docs/cloud/about-cloud-develop-defer) of build artifacts to your Cloud project's production environment.
* Speedier, lower-cost builds.
* Support for dbt Mesh ([cross-project `ref`](/docs/collaborate/govern/project-dependencies)),
* Significant platform improvements, to be released over the coming months.
https://github.com/dbt-labs/docs.getdbt.com/pull/4320* Significant platform improvements, to be released over the coming months.


## Prerequisites
The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-cloud/regions-ip-addresses) and and for both multi-tenant and single-tenant accounts (Azure single-tenant not supported at this time).
The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-cloud/regions-ip-addresses) and for both multi-tenant and single-tenant accounts (Azure single-tenant not supported at this time).

You must be on dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade.
- Ensure you are using dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade.
- Avoid using SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections.
- Avoid using [PrivateLink](/docs/cloud/secure/about-privatelink).

## Install dbt Cloud CLI

You can install the dbt Cloud CLI on the command line by using one of these methods:
You can install the dbt Cloud CLI on the command line by using one of these methods.

<details>
<summary>View a video tutorial for a step-by-step guide to installing</summary>

<LoomVideo id="dd80828306c5432a996d4580135041b6?sid=fe1895b7-1281-4e42-9968-5f7d11768000"/>

</details>

<Tabs queryString="install">

<TabItem value="brew" label="macOS (brew)">

Before you begin, make sure you have [Homebrew installed](http://brew.sh/) in your code editor or command line terminal. Refer to the [FAQs](#faqs) if your operating system runs into path conflicts.


1. Run the following command to verify that there is no conflict with a dbt Core installation on your system:
1. Run the following command to verify that you don't already have dbt Core installed:

```bash
which dbt
```
- This should return a `dbt not found`. If the dbt help text appears, use `pip uninstall dbt` to deactivate dbt Core from your machine.
- This should return a `dbt not found`. If the dbt help text appears, use `pip uninstall dbt` to remove dbt Core from your machine. <br />

2. Install the dbt Cloud CLI with Homebrew:

```bash
brew untap dbt-labs/dbt
brew tap dbt-labs/dbt-cli
brew install dbt
```
- First, remove the dbt-labs tap, the separate repository for packages, from Homebrew. This prevents Homebrew from installing packages from that repository:
```bash
brew untap dbt-labs/dbt
- Then run `brew tap` to add and install the dbt Cloud CLI as a package:
```bash
brew tap dbt-labs/dbt-cli
```
- Lastly, install the dbt Cloud CLI with Homebrew:
```bash
brew install dbt
```

3. Verify your installation by running `dbt --help` in the command line. If you see the following output, your installation is correct:
```bash
The dbt Cloud CLI - an ELT tool for running SQL transformations and data models in dbt Cloud...
```

If you don't see this output, check that you've deactivated pyenv or venv and don't have a global dbt version installed.

* Note that you no longer need to run the `dbt deps` command when your environment starts. This step was previously required during initialization. However, you should still run `dbt deps` if you make any changes to your `packages.yml` file.

3. Verify the installation by running `dbt --help` from the command line. If the help text doesn't indicate that you're using the dbt Cloud CLI, make sure you've deactivated your pyenv or venv and don't have a version of dbt globally installed.
* You don't have to run the `dbt deps` command when your environment starts. Previously, you had to do it during initialization. However, you'll still need to run `dbt deps` if you make changes to your `packages.yml` file.
4. After you've verified the installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project and use it to run [dbt commands](/reference/dbt-commands) similar to dbt Core. For example, execute `dbt compile` to compile a project using dbt Cloud and validate your models and tests.
* If you're using the dbt Cloud CLI, you can connect to your data platform directly in the dbt Cloud interface and don't need a [`profiles.yml`](/docs/core/connect-data-platform/profiles.yml) file locally on your machine.

</TabItem>

Expand All @@ -73,8 +96,17 @@ Advanced users can configure multiple projects to use the same dbt Cloud CLI by
Note that if you are using VS Code, you must restart it to pick up modified environment variables.
:::

3. Verify the installation by running `./dbt --help` from the command line. If the help text doesn't indicate that you're using the dbt Cloud CLI, make sure you've deactivated your pyenv or venv and don't have a version of dbt globally installed.
* You don't have to run the `dbt deps` command when your environment starts. Previously, you had to do it during initialization. However, you'll still need to run `dbt deps` if you make changes to your `packages.yml` file.
3. Verify your installation by running `./dbt --help` in the command line. If you see the following output, your installation is correct:
```bash
The dbt Cloud CLI - an ELT tool for running SQL transformations and data models in dbt Cloud...
```

If you don't see this output, check that you've deactivated pyenv or venv and don't have a global dbt version installed.

* Note that you no longer need to run the `dbt deps` command when your environment starts. This step was previously required during initialization. However, you should still run `dbt deps` if you make any changes to your `packages.yml` file.

4. After installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project and use it to run [dbt commands](/reference/dbt-commands) similar to dbt Core. For example, execute `dbt compile`, to compile a project using dbt Cloud and confirm that it works.
* If you're using the dbt Cloud CLI, you can connect to your data platform directly in the dbt Cloud interface and don't need a [`profiles.yml`](/docs/core/connect-data-platform/profiles.yml) file locally on your machine.

</TabItem>

Expand All @@ -97,23 +129,36 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa

:::

3. Verify the installation by running `./dbt --help` from the command line. If the help text doesn't indicate that you're using the dbt Cloud CLI, make sure you've deactivated your pyenv or venv and don't have a version of dbt globally installed.
* You don't have to run the `dbt deps` command when your environment starts. Previously, you had to do it during initialization. However, you'll still need to run `dbt deps` if you make changes to your `packages.yml` file.
3. Verify your installation by running `./dbt --help` in the command line. If you see the following output, your installation is correct:
```bash
The dbt Cloud CLI - an ELT tool for running SQL transformations and data models in dbt Cloud...
```

If you don't see this output, check that you've deactivated pyenv or venv and don't have a global dbt version installed.

* Note that you no longer need to run the `dbt deps` command when your environment starts. This step was previously required during initialization. However, you should still run `dbt deps` if you make any changes to your `packages.yml` file.

4. After installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project and use it to run [dbt commands](/reference/dbt-commands) similar to dbt Core. For example, execute `dbt compile`, to compile a project using dbt Cloud and confirm that it works.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. After installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project and use it to run [dbt commands](/reference/dbt-commands) similar to dbt Core. For example, execute `dbt compile`, to compile a project using dbt Cloud and confirm that it works.
4. After you've verified the installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project and use it to run [dbt commands](/reference/dbt-commands) similar to dbt Core. For example, execute `dbt compile` to compile a project using dbt Cloud and validate your models and tests.

* If you're using the dbt Cloud CLI, you can connect to your data platform directly in the dbt Cloud interface and don't need a [`profiles.yml`](/docs/core/connect-data-platform/profiles.yml) file locally on your machine.

</TabItem>

<TabItem value="pip" label="Existing dbt Core users (pip)">

:::info Use native packages or a virtual environment to avoid overriding dbt Core

Installing the dbt Cloud CLI with pip replaces dbt Core. This change can be avoided by using the native install method and configuring your PATH or by creating a new virtual environment.
:::info Use native packages or a virtual environment to prevent dbt Core conflicts

To prevent overwriting dbt Core, avoid installing the dbt Cloud CLI with pip. Instead, consider using the native installation method and configuring your PATH or create a new virtual environment.

Otherwise, to switch back to dbt Core, uninstall the dbt Cloud CLI and follow the dbt Core installation instructions.
If you've already installed the dbt Cloud CLI and need to switch back to dbt Core, uninstall the dbt Cloud CLI, and follow the dbt Core installation instructions.

You can also have both dbt Cloud CLI and dbt Core installed simultaneously. To avoid conflicts, alias the dbt Cloud CLI as `dbt-cloud`. For more details, check the [FAQs](#faqs) if your operating system experiences path conflicts.
:::

:::

Before installing the dbt Cloud CLI, make sure you have Python installed and your virtual environment venv or pyenv . If you already have a Python environment configured, you can skip to the [pip installation step](#install-dbt-cloud-cli-in-pip).


### Install a virtual environment

We recommend using virtual environments (venv) to namespace `cloud-cli`.
Expand Down Expand Up @@ -156,6 +201,9 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`.
pip3 install dbt-core==VERSION
```

4. After you've verified the installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project and use it to run [dbt commands](/reference/dbt-commands) similar to dbt Core. For example, execute `dbt compile` to compile a project using dbt Cloud and validate your models and tests.
* If you're using the dbt Cloud CLI, you can connect to your data platform directly in the dbt Cloud interface and don't need a [`profiles.yml`](/docs/core/connect-data-platform/profiles.yml) file locally on your machine.

</TabItem>

</Tabs>
Expand Down Expand Up @@ -198,16 +246,6 @@ To update:

</Tabs>


## Next steps

After installation, you can [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project and use it to run [dbt commands](/reference/dbt-commands) similar to dbt Core.

For example, you can execute `dbt compile` to compile a project using dbt Cloud.

Note, that if you're using the dbt Cloud CLI, you can connect to your data platform directly in the dbt Cloud interface and don't need a [`profiles.yml`](/docs/core/connect-data-platform/profiles.yml) file.


## FAQs

<details>
Expand All @@ -231,3 +269,5 @@ If you have dbt Core installed locally, either:

You can always uninstall the dbt Cloud CLI to return to using dbt Core.
</details>