Skip to content

Commit

Permalink
Merge branch 'current' into mirnawong1-patch-5
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Oct 24, 2023
2 parents 99dccf8 + c7fa321 commit 9f98fe7
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 66 deletions.
127 changes: 64 additions & 63 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 All @@ -169,13 +169,6 @@ During the public preview period, we recommend updating before filing a bug repo


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

To update:
- Make sure you're in your virtual environment
- Run `pip install --upgrade dbt`.
</TabItem>

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

Expand All @@ -195,6 +188,14 @@ To update, follow the same process explained in [Windows](/docs/cloud/cloud-cli-

</TabItem>

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

To update:
- Make sure you're in your virtual environment
- Run `pip install --upgrade dbt`.
</TabItem>
</Tabs>
Expand Down
15 changes: 12 additions & 3 deletions website/docs/docs/cloud/configure-cloud-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import CloudCLIFlag from '/snippets/_cloud-cli-flag.md';
- You must set up a project in dbt Cloud.
- **Note** &mdash; 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.
- You must have your [personal development credentials](/docs/dbt-cloud-environments#set-developer-credentials) set for that project. The dbt Cloud CLI will use these credentials, stored securely in dbt Cloud, to communicate with your data platform.
- You must [enroll](/docs/dbt-versions/experimental-features) in the dbt Cloud beta features.
- To enroll, navigate to your **Profile Settings** and enable the **Beta** flag under **Experimental Features**.
- You must [enroll](/docs/dbt-versions/experimental-features) in the dbt Cloud beta features.
- To enroll, navigate to your **Profile Settings** and enable the **Beta** flag under **Experimental Features**.
- You must be on dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade.

## Configure the dbt Cloud CLI
Expand Down Expand Up @@ -78,12 +78,21 @@ Once you install the dbt Cloud CLI, you need to configure it to connect to a dbt

- To find your project ID, select **Develop** in the dbt Cloud navigation menu. You can use the URL to find the project ID. For example, in `https://cloud.getdbt.com/develop/26228/projects/123456`, the project ID is `123456`.

### Set environment variables

To set environment variables in the dbt Cloud CLI for your dbt project:

1. Select the gear icon on the upper right of the page.
2. Then select **Profile Settings**, then **Credentials**.
3. Click on your project and scroll to the **Environment Variables** section.
4. Click **Edit** on the lower right and then set the user-level environment variables.

## Use the dbt Cloud CLI

- The dbt Cloud CLI shares the same set of [dbt commands](/reference/dbt-commands) as dbt Core and processes the commands you invoke.
- It allows you to use automatic deferral of build artifacts to your Cloud project's production environment.
- It also supports [project dependencies](/docs/collaborate/govern/project-dependencies), which allows you to depend on another project using the metadata service in dbt Cloud.
- Project dependencies instantly connects to and references (or `ref`) public models defined in other projects. This means you don't need to execute or analyze these upstream models yourself. Instead, you treat them as an API that returns a dataset.
- Project dependencies instantly connect to and reference (or `ref`) public models defined in other projects. This means you don't need to execute or analyze these upstream models yourself. Instead, you treat them as an API that returns a dataset.

:::tip Use the <code>--help</code> flag
As a tip, most command-line tools have a `--help` flag to show available commands and arguments. Use the `--help` flag with dbt in two ways:
Expand Down
2 changes: 2 additions & 0 deletions website/docs/docs/use-dbt-semantic-layer/gsheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ When querying your data with Google Sheets:

- It returns the data to the cell you have clicked on.
- The custom menu operation has a timeout limit of six (6) minutes.
- If you're using this extension, make sure you're signed into Chrome with the same Google profile you used to set up the Add-On. Log in with one Google profile at a time as using multiple Google profiles at once might cause issues.


## Custom menu functions

Expand Down

0 comments on commit 9f98fe7

Please sign in to comment.