Skip to content

Commit

Permalink
adding steve's video
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Oct 24, 2023
1 parent c7fa321 commit 953d748
Showing 1 changed file with 54 additions and 26 deletions.
80 changes: 54 additions & 26 deletions website/docs/docs/cloud/cloud-cli-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You must be on dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/db

## 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. For a video instruction step-by-step guide, refer to the [FAQs](#faqs).

<Tabs queryString="install">

Expand All @@ -38,24 +38,35 @@ You can install the dbt Cloud CLI on the command line by using one of these meth
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
```

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.
- First, remove a tap, which is like a separate repository for packages, from Homebrew. This stops 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 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 global dbt version 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 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.

**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.

</TabItem>

<TabItem value="windows" label="Windows (native executable)">
Expand All @@ -73,9 +84,14 @@ 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.
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 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.

**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.

</TabItem>

<TabItem value="linux" label="Linux (native executable)">
Expand All @@ -97,23 +113,32 @@ 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.
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 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.

**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.

</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

Otherwise, to switch back to dbt Core, uninstall the dbt Cloud CLI and follow the dbt Core installation instructions.
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.

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 +181,10 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`.
pip3 install dbt-core==VERSION
```
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.
**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.
</TabItem>
</Tabs>
Expand Down Expand Up @@ -198,16 +227,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 +250,12 @@ If you have dbt Core installed locally, either:

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

<details>
<summary>Are there any instructional videos to help guide me through installation? </summary>
For a video walkthrough of the installation process, refer to the following video:

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

</details>

0 comments on commit 953d748

Please sign in to comment.