Skip to content

Commit

Permalink
Merge branch 'current' into upsolver_rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Sep 5, 2023
2 parents f45ed3b + ad2863b commit 005af78
Show file tree
Hide file tree
Showing 4 changed files with 847 additions and 60 deletions.
58 changes: 32 additions & 26 deletions website/docs/docs/cloud/cloud-cli-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ description: "Instructions for installing and configuring dbt Cloud CLI"

:::warning Alpha functionality

The following installation instructions are for the dbt Cloud CLI, currently in alpha. These instructions are not intended for general audiences at this time.
The following installation instructions are for the dbt Cloud CLI, currently in Alpha (actively in development and being tested).

These instructions are not intended for general audiences at this time.

:::

## Installing dbt Cloud CLI

### Install and update with Brew on MacOS (recommended)

1. Install the CLI:
1. Install the dbt Cloud CLI:

```bash
brew tap dbt-labs/dbt-cli
Expand All @@ -30,7 +32,7 @@ dbt --help

### Manually install (Windows and Linux)

1. Download the latest release for your platform from [Github](https://github.com/dbt-labs/dbt-cli/releases).
1. Download the latest release for your platform from [GitHub](https://github.com/dbt-labs/dbt-cli/releases).
2. Add the `dbt` executable to your path.
3. Move to a directory with a dbt project, and create a `dbt_cloud.yml` file containing your `project-id` from dbt Cloud.
4. Invoke `dbt --help` from your terminal to see a list of supported commands.
Expand All @@ -41,50 +43,54 @@ Follow the same process in [Installing dbt Cloud CLI](#manually-install-windows-

## Setting up the CLI

The following instructions are for setting up the dbt Cloud CLI.

1. Ensure that you have created a project in [dbt Cloud](https://cloud.getdbt.com/).

2. Ensure that your personal [development credentials](https://cloud.getdbt.com/settings/profile/credentials) are set on the project.

3. Navigate to [your profile](https://cloud.getdbt.com/settings/profile) and enable the "beta features" flag under "Experimental Features."
3. Navigate to [your profile](https://cloud.getdbt.com/settings/profile) and enable the **Beta** flag under **Experimental Features.**

4. Create an environment variable with your [dbt cloud API key](https://cloud.getdbt.com/settings/profile#api-access):
4. Create an environment variable with your [dbt Cloud API key](https://cloud.getdbt.com/settings/profile#api-access):

```bash
vi ~/.zshrc

> $ vi ~/.zshrc

...

# dbt Cloud CLI
export DBT_CLOUD_API_KEY="1234"

# dbt Cloud CLI
export DBT_CLOUD_API_KEY="1234" # Replace "1234" with your API key
```

5. Load the new environment variable. Note: you may need to reactivate your python virtual environment after sourcing your shell's dot file. Alternatively, restart your shell instead of sourcing the shell's dot file
5. Load the new environment variable. Note: You may need to reactivate your Python virtual environment after sourcing your shell's dot file. Alternatively, restart your shell instead of sourcing the shell's dot file

```bash
> $ source ~/.zshrc
source ~/.zshrc
```

6. Navigate to a dbt project

```bash
> $ cd ~/dbt-projects/jaffle_shop
cd ~/dbt-projects/jaffle_shop
```

7. Create a dbt_cloud.yml in the root project directory. The file is required to have a `project-id` field with a valid [project ID](#glossary):
7. Create a `dbt_cloud.yml` in the root project directory. The file is required to have a `project-id` field with a valid [project ID](#glossary). Enter the following commands:

```bash
> $ pwd
/Users/user/dbt-projects/jaffle_shop
pwd # Input
/Users/user/dbt-projects/jaffle_shop # Output
```

> $ cat dbt_cloud.yml
project-id: '123456'
```bash
echo "project-id: '<your project id>'" > dbt_cloud.yml # Input
```

```bash
cat dbt_cloud.yml # Input
project-id: '123456' # Output
```

You can find your project ID by selecting your project and clicking on **Develop** in the navigation bar. Your project ID is the number in the URL: https://cloud.getdbt.com/develop/26228/projects/`PROJECT_ID`.
You can find your project ID by selecting your project and clicking on **Develop** in the navigation bar. Your project ID is the number in the URL: https://cloud.getdbt.com/develop/26228/projects/PROJECT_ID.

If dbt_cloud.yml already exists, edit the file and verify the project ID field uses a valid project ID.
If `dbt_cloud.yml` already exists, edit the file, and verify the project ID field uses a valid project ID.

#### Upgrade the CLI with Brew

Expand All @@ -97,8 +103,8 @@ brew upgrade dbt-cloud-cli

**Coming soon**

### Glossary
## Glossary

- **dbt cloud API key:** your API key found by navigating to the **gear icon**, clicking **Profile Settings**, and scrolling down to **API**.
- **Project ID:** the ID of the dbt project you're working with. Can be retrieved from the dbt cloud URL after a project has been selected, for example, `https://cloud.getdbt.com/deploy/{accountID}/projects/{projectID}`
- **Development credentials:** your personal warehouse credentials for the project you’re working with. They can be set by selecting the project and entering them in dbt Cloud. Navigate to the **gear icon**, click **Profile Settings**, and click **Credentials** from the left-side menu.
- **dbt cloud API key:** Your API key found by navigating to the **gear icon**, clicking **Profile Settings**, and scrolling down to **API**.
- **Project ID:** The ID of the dbt project you're working with. Can be retrieved from the dbt Cloud URL after a project has been selected, for example, `https://cloud.getdbt.com/deploy/{accountID}/projects/{projectID}`
- **Development credentials:** Your personal warehouse credentials for the project you’re working with. They can be set by selecting the project and entering them in dbt Cloud. Navigate to the **gear icon**, click **Profile Settings**, and click **Credentials** from the left-side menu.
Loading

0 comments on commit 005af78

Please sign in to comment.