Skip to content

Commit

Permalink
This branch was auto-updated!
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 23, 2023
2 parents 471e3c3 + 8576020 commit bc9f52c
Showing 1 changed file with 56 additions and 56 deletions.
112 changes: 56 additions & 56 deletions website/docs/docs/cloud/cloud-cli-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,62 +32,6 @@ You must be on dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/db
You can install the dbt Cloud CLI on the command line by using one of these methods:

<Tabs queryString="install">

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

Otherwise, to switch back to dbt Core, uninstall the dbt Cloud CLI and follow the dbt Core installation instructions.

:::

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

1. Create a new venv:
```shell
python3 -m venv dbt-cloud
```

2. Activate the virtual environment each time you create a shell window or session:
```shell
source dbt-cloud/bin/activate # activate the environment for Mac and Linux OR
dbt-env\Scripts\activate # activate the environment for Windows
```

3. (Mac and Linux only) Create an alias to activate your dbt environment with every new shell window or session. You can add the following to your shell's configuration file (for example, $HOME/.bashrc, $HOME/.zshrc) while replacing `<PATH_TO_VIRTUAL_ENV_CONFIG>` with the path to your virtual environment configuration:
```shell
alias env_dbt='source <PATH_TO_VIRTUAL_ENV_CONFIG>/bin/activate'
```
### Install dbt Cloud CLI in pip
1. (Optional) If you already have dbt Core installed, this installation will override that package. Note your dbt Core version in case you need to reinstall it later:
```bash
dbt --version
```
2. Make sure you're in your virtual environment and run the following command to install the dbt Cloud CLI:

```bash
pip3 install dbt
```

3. (Optional) To revert back to dbt Core, first uninstall both the dbt Cloud CLI and dbt Core
4. Reinstall dbt Core using the version from Step 2.

```bash
pip3 uninstall dbt-core dbt
pip3 install dbt-core==VERSION
```

</TabItem>

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

Expand Down Expand Up @@ -158,6 +102,62 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa

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

Otherwise, to switch back to dbt Core, uninstall the dbt Cloud CLI and follow the dbt Core installation instructions.

:::

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

1. Create a new venv:
```shell
python3 -m venv dbt-cloud
```

2. Activate the virtual environment each time you create a shell window or session:
```shell
source dbt-cloud/bin/activate # activate the environment for Mac and Linux OR
dbt-env\Scripts\activate # activate the environment for Windows
```

3. (Mac and Linux only) Create an alias to activate your dbt environment with every new shell window or session. You can add the following to your shell's configuration file (for example, $HOME/.bashrc, $HOME/.zshrc) while replacing `<PATH_TO_VIRTUAL_ENV_CONFIG>` with the path to your virtual environment configuration:
```shell
alias env_dbt='source <PATH_TO_VIRTUAL_ENV_CONFIG>/bin/activate'
```
### Install dbt Cloud CLI in pip
1. (Optional) If you already have dbt Core installed, this installation will override that package. Note your dbt Core version in case you need to reinstall it later:
```bash
dbt --version
```
2. Make sure you're in your virtual environment and run the following command to install the dbt Cloud CLI:

```bash
pip3 install dbt
```

3. (Optional) To revert back to dbt Core, first uninstall both the dbt Cloud CLI and dbt Core
4. Reinstall dbt Core using the version from Step 2.

```bash
pip3 uninstall dbt-core dbt
pip3 install dbt-core==VERSION
```

</TabItem>

</Tabs>


Expand Down

0 comments on commit bc9f52c

Please sign in to comment.