From 753a660183e9360d0fe5769a9a1f30efc518c2aa Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:58:57 +0100 Subject: [PATCH 1/7] Update configure-cloud-cli.md add env var instructions per slack: https://getdbt.slack.com/archives/C03SAHKKG2Z/p1697708585299879 cc @greg-mckeon --- website/docs/docs/cloud/configure-cloud-cli.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/cloud/configure-cloud-cli.md b/website/docs/docs/cloud/configure-cloud-cli.md index f13a4d267c3..4473a80cb18 100644 --- a/website/docs/docs/cloud/configure-cloud-cli.md +++ b/website/docs/docs/cloud/configure-cloud-cli.md @@ -16,8 +16,8 @@ import CloudCLIFlag from '/snippets/_cloud-cli-flag.md'; - You must set up a project in dbt Cloud. - **Note** — 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 @@ -78,12 +78,23 @@ 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 `DBT_ENVIRONMENT` 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. + +If you're receiving an `Env var required but not provided: 'DBT_ENVIRONMENT'` error, you may be unintentionally running dbt Core. You can verify this by running `which dbt` to confirm if the output refers to the dbt Cloud CLI. + ## 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 --help 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: From e547c68d98a71cd705e3674adff79c50f47fbae7 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 23 Oct 2023 11:11:28 +0100 Subject: [PATCH 2/7] Update website/docs/docs/cloud/configure-cloud-cli.md --- website/docs/docs/cloud/configure-cloud-cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/cloud/configure-cloud-cli.md b/website/docs/docs/cloud/configure-cloud-cli.md index 4473a80cb18..2c3d1c43395 100644 --- a/website/docs/docs/cloud/configure-cloud-cli.md +++ b/website/docs/docs/cloud/configure-cloud-cli.md @@ -80,7 +80,7 @@ Once you install the dbt Cloud CLI, you need to configure it to connect to a dbt ### Set environment variables -To set `DBT_ENVIRONMENT` in the dbt Cloud CLI for your dbt project: +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**. From f2b8da132501b6154e68539f4fc03d2c788ca5c5 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 23 Oct 2023 16:10:42 +0100 Subject: [PATCH 3/7] Update configure-cloud-cli.md remove text per Greg --- website/docs/docs/cloud/configure-cloud-cli.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/website/docs/docs/cloud/configure-cloud-cli.md b/website/docs/docs/cloud/configure-cloud-cli.md index 2c3d1c43395..c03f638c9b4 100644 --- a/website/docs/docs/cloud/configure-cloud-cli.md +++ b/website/docs/docs/cloud/configure-cloud-cli.md @@ -87,8 +87,6 @@ To set environment variables in the dbt Cloud CLI for your dbt project: 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. -If you're receiving an `Env var required but not provided: 'DBT_ENVIRONMENT'` error, you may be unintentionally running dbt Core. You can verify this by running `which dbt` to confirm if the output refers to the dbt Cloud CLI. - ## 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. From 85760203f0f63620f2994c56a49df3f22feb9d23 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:39:40 +0100 Subject: [PATCH 4/7] Update cloud-cli-installation.md Reorder install steps to avoid confusion --- .../docs/docs/cloud/cloud-cli-installation.md | 112 +++++++++--------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 6d3060d9c23..a2ee6cdc76c 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -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: - - - -:::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 `` with the path to your virtual environment configuration: - ```shell - alias env_dbt='source /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 - ``` - - @@ -158,6 +102,62 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa + + +:::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 `` with the path to your virtual environment configuration: + ```shell + alias env_dbt='source /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 + ``` + + + From ee1c27762d92639bfb4b06241264eb3506a8dc8f Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:50:27 +0100 Subject: [PATCH 5/7] Update cloud-cli-installation.md Reorder update steps (forgot to create a branch for previous change) --- website/docs/docs/cloud/cloud-cli-installation.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index a2ee6cdc76c..5c0d6ad543e 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -169,13 +169,6 @@ During the public preview period, we recommend updating before filing a bug repo - - -To update: -- Make sure you're in your virtual environment -- Run `pip install --upgrade dbt`. - - @@ -195,6 +188,14 @@ To update, follow the same process explained in [Windows](/docs/cloud/cloud-cli- + + +To update: +- Make sure you're in your virtual environment +- Run `pip install --upgrade dbt`. + + + From c98373bd2f41ae032cbf58f568760be407b979c5 Mon Sep 17 00:00:00 2001 From: rpourzand Date: Mon, 23 Oct 2023 15:21:09 -0700 Subject: [PATCH 6/7] Update gsheets.md I added a known limitation with Google apps that we saw during our workshop a lot! Once folks had only 1 user in chrome, it worked fine. --- website/docs/docs/use-dbt-semantic-layer/gsheets.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/docs/use-dbt-semantic-layer/gsheets.md b/website/docs/docs/use-dbt-semantic-layer/gsheets.md index 2140becc9d8..7c5f0b6382c 100644 --- a/website/docs/docs/use-dbt-semantic-layer/gsheets.md +++ b/website/docs/docs/use-dbt-semantic-layer/gsheets.md @@ -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 are logged into Chrome with a different Google user than the one you authenticated the Add-On with, it may not work. We recommend you are logged in with one Google profile at a time when using this extension. + ## Custom menu functions From 7cf098d0ffe03bdadd8690489372e0aa8cf69822 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 24 Oct 2023 09:50:17 +0100 Subject: [PATCH 7/7] Update website/docs/docs/use-dbt-semantic-layer/gsheets.md --- website/docs/docs/use-dbt-semantic-layer/gsheets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/use-dbt-semantic-layer/gsheets.md b/website/docs/docs/use-dbt-semantic-layer/gsheets.md index 7c5f0b6382c..ee391c91b70 100644 --- a/website/docs/docs/use-dbt-semantic-layer/gsheets.md +++ b/website/docs/docs/use-dbt-semantic-layer/gsheets.md @@ -31,7 +31,7 @@ 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 are logged into Chrome with a different Google user than the one you authenticated the Add-On with, it may not work. We recommend you are logged in with one Google profile at a time when using this extension. +- 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