From 138a4ca8259356bc196d700dfb5b1276df5a3bb5 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 27 Oct 2023 16:11:32 +0100 Subject: [PATCH 01/14] adding new updates --- .../docs/docs/cloud/cloud-cli-installation.md | 63 +++++++++++-------- website/docs/reference/commands/clone.md | 17 +++++ website/docs/reference/dbt-commands.md | 8 +-- 3 files changed, 57 insertions(+), 31 deletions(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 179af745685..31db1408983 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -34,7 +34,7 @@ The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-clo You can install the dbt Cloud CLI on the command line by using one of these methods.
-View a video tutorial for a step-by-step guide to installing +View a video tutorial for a step-by-step guide to installation. @@ -145,43 +145,47 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa +If you already have dbt Core installed, you can install the dbt Cloud CLI using pip. Here are some considerations: + +- **Prevent conflicts**
+ To prevent overwriting dbt Core, avoid installing the dbt Cloud CLI with `pip`. Instead, consider using the native installation method (Homebrew) and configure your PATH or create a new virtual environment.
+- **Use both dbt Cloud CLI and dbt Core**
+ Have both the dbt Cloud CLI and dbt Core installed simultaneously to meet your needs. 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.
+- **Switch from the dbt Cloud CLI to dbt Core**
+ If you've already installed the dbt Cloud CLI and need to switch back to dbt Core: + - Uninstall the dbt Cloud CLI using the command: `pip uninstall dbt` + - Reinstall dbt Core using the following command, replacing "adapter_name" with the appropriate adapter name: + ```shell + pip install dbt-adapter_name --force-reinstall + ``` + For example, if I used Snowflake as an adapter, I would run: `pip install dbt-snowflake --force-reinstall` -:::info Use native packages or a virtual environment to prevent dbt Core conflicts - -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`. -1. Create a new venv: +1. Create a new virtual environment named "dbt-cloud" with this command: ```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 - ``` +2. Activate the virtual environment each time you create a shell window or session, depending on your operating system: + + - For Mac and Linux, use: `source dbt-cloud/bin/activate`
+ - For Windows, use: `dbt-env\Scripts\activate` -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: +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: +1. (Optional) If you already have dbt Core installed, this installation will override that package. Check your dbt Core version in case you need to reinstall it later by running the following command : ```bash dbt --version @@ -193,22 +197,23 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`. 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. +3. (Optional) To revert back to dbt Core, first uninstall both the dbt Cloud CLI and dbt Core. Then reinstall dbt Core using the version from Step 1. ```bash pip3 uninstall dbt-core dbt pip3 install dbt-core==VERSION ``` -4. After you've verified the 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 validate your models and tests. +4. After you've verified the installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. You can then 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 validate your models and tests. * 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 locally on your machine.
+ + ## Update dbt Cloud CLI The following instructions explain how to update the dbt CLoud CLI to the latest version depending on your operating system. @@ -246,6 +251,11 @@ To update: +## dbt Cloud CLI extensions +Command line extensions are additional functionalities that you can add to a command line tool or shell environment. These extensions expand the capabilities of the CLI, making it more versatile and efficient. + +The dbt Cloud CLI doesn't currently support extensions, such as SQLFluff or dbt-power-user, during the public preview period. This is because..... + ## FAQs
@@ -261,11 +271,10 @@ For compatibility, both the dbt Cloud CLI and dbt Core are invoked by running pip3 install dbt [pip](/docs/cloud/cloud-cli-installation?install=pip#install-dbt-cloud-cli) command, or +- Install natively, however ensure you deactivate your Python environment or uninstall it using `pip uninstall dbt` before proceeding. -3. (Advanced users) Install natively, but modify the $PATH environment variable to correctly point to the dbt Cloud CLI binary to use both dbt Cloud CLI and dbt Core together. +1. (Advanced users) Install natively, but modify the $PATH environment variable to correctly point to the dbt Cloud CLI binary to use both dbt Cloud CLI and dbt Core together. You can always uninstall the dbt Cloud CLI to return to using dbt Core.
diff --git a/website/docs/reference/commands/clone.md b/website/docs/reference/commands/clone.md index ea3e570447d..0a6d32de858 100644 --- a/website/docs/reference/commands/clone.md +++ b/website/docs/reference/commands/clone.md @@ -16,6 +16,7 @@ The `clone` command is useful for: - handling incremental models in dbt Cloud CI jobs (on data warehouses that support zero-copy cloning tables) - testing code changes on downstream dependencies in your BI tool + ```bash # clone all of my models from specified state to my target schema(s) dbt clone --state path/to/artifacts @@ -37,3 +38,19 @@ Unlike deferral, `dbt clone` requires some compute and creation of additional ob For example, by creating actual data warehouse objects, `dbt clone` allows you to test out your code changes on downstream dependencies _outside of dbt_ (such as a BI tool). As another example, you could `clone` your modified incremental models as the first step of your dbt Cloud CI job to prevent costly `full-refresh` builds for warehouses that support zero-copy cloning. + +## Cloning in dbt Cloud + +You can clone nodes between states in dbt Cloud using the `dbt clone` command. This is available in the [dbt Cloud IDE](/docs/cloud/dbt-cloud-ide/develop-in-the-cloud) and the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation) and relies on the [`--defer`](/reference/node-selection/defer) feature. For more details on defer in dbt Cloud, read [Using defer in dbt Cloud](/docs/cloud/about-cloud-develop-defer). + +- **Using dbt Cloud CLI** — The `dbt clone` command in the dbt Cloud CLI automatically includes the `--defer` flag. This means you can use the `dbt clone` command in the dbt Cloud CLI without any additional setup. + +- **Using dbt Cloud IDE** — To use the `dbt clone` command in the dbt Cloud IDE, follow these steps before running the `dbt clone` command: + + - Set up your **Production environment** and have a successful job run. + - Enable **Defer to production** by toggling the switch in the lower-right corner of the command bar. + + - Run the `dbt clone` command from the command bar. + + + diff --git a/website/docs/reference/dbt-commands.md b/website/docs/reference/dbt-commands.md index 1448d9849d3..587ad7687ac 100644 --- a/website/docs/reference/dbt-commands.md +++ b/website/docs/reference/dbt-commands.md @@ -11,7 +11,7 @@ The following sections outline the commands supported by dbt and their relevant ### Available commands - + All commands in the table are compatible with either the dbt Cloud IDE, dbt Cloud CLI, or dbt Core. @@ -22,9 +22,9 @@ You can run dbt commands in your specific tool by prefixing them with `dbt`. Fo | [build](/reference/commands/build) | Build and test all selected resources (models, seeds, snapshots, tests) | All | All [supported versions](/docs/dbt-versions/core) | | cancel | Cancels the most recent invocation.| dbt Cloud CLI | Requires [dbt v1.6 or higher](/docs/dbt-versions/core) | | [clean](/reference/commands/clean) | Deletes artifacts present in the dbt project | All | All [supported versions](/docs/dbt-versions/core) | -| [clone](/reference/commands/clone) | Clone selected models from the specified state | dbt Cloud CLI
dbt Core | Requires [dbt v1.6 or higher](/docs/dbt-versions/core) | +| [clone](/reference/commands/clone) | Clone selected models from the specified state | All | Requires [dbt v1.6 or higher](/docs/dbt-versions/core) | | [compile](/reference/commands/compile) | Compiles (but does not run) the models in a project | All | All [supported versions](/docs/dbt-versions/core) | -| [debug](/reference/commands/debug) | Debugs dbt connections and projects | dbt Core | All [supported versions](/docs/dbt-versions/core) | +| [debug](/reference/commands/debug) | Debugs dbt connections and projects | All | All [supported versions](/docs/dbt-versions/core) | | [deps](/reference/commands/deps) | Downloads dependencies for a project | All | All [supported versions](/docs/dbt-versions/core) | | [docs](/reference/commands/cmd-docs) | Generates documentation for a project | All | All [supported versions](/docs/dbt-versions/core) | | help | Displays help information for any command | dbt Core
dbt Cloud CLI | All [supported versions](/docs/dbt-versions/core) | @@ -43,7 +43,7 @@ You can run dbt commands in your specific tool by prefixing them with `dbt`. Fo
- + Select the tabs that are relevant to your development workflow. For example, if you develop in the dbt Cloud IDE, select **dbt Cloud**. From bdc6aedb671e2af2dceba457964474ec0954832d Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 27 Oct 2023 16:16:13 +0100 Subject: [PATCH 02/14] remove duplicative --- website/docs/reference/commands/clone.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/commands/clone.md b/website/docs/reference/commands/clone.md index 0a6d32de858..cc52706d3ff 100644 --- a/website/docs/reference/commands/clone.md +++ b/website/docs/reference/commands/clone.md @@ -43,7 +43,7 @@ As another example, you could `clone` your modified incremental models as the fi You can clone nodes between states in dbt Cloud using the `dbt clone` command. This is available in the [dbt Cloud IDE](/docs/cloud/dbt-cloud-ide/develop-in-the-cloud) and the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation) and relies on the [`--defer`](/reference/node-selection/defer) feature. For more details on defer in dbt Cloud, read [Using defer in dbt Cloud](/docs/cloud/about-cloud-develop-defer). -- **Using dbt Cloud CLI** — The `dbt clone` command in the dbt Cloud CLI automatically includes the `--defer` flag. This means you can use the `dbt clone` command in the dbt Cloud CLI without any additional setup. +- **Using dbt Cloud CLI** — The `dbt clone` command in the dbt Cloud CLI automatically includes the `--defer` flag. This means you can use the `dbt clone` command without any additional setup. - **Using dbt Cloud IDE** — To use the `dbt clone` command in the dbt Cloud IDE, follow these steps before running the `dbt clone` command: From 769aeb57ce6a5fbdd3c2e4bdd16cc32d057ef388 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 27 Oct 2023 16:29:24 +0100 Subject: [PATCH 03/14] add sso --- website/docs/docs/cloud/cloud-cli-installation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 31db1408983..7c20479f378 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -28,6 +28,7 @@ The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-clo - Ensure you are using dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade. - Avoid using SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections. - Avoid using [PrivateLink](/docs/cloud/secure/about-privatelink). +- Avoid using Single sign-on (SSO) for Snowflake or SSH tunnels for Redshift. ## Install dbt Cloud CLI From 8e4cc786655da54b0abcefe2c920346cf233c343 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Fri, 27 Oct 2023 16:49:57 +0100 Subject: [PATCH 04/14] update per eng --- website/docs/docs/cloud/cloud-cli-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 7c20479f378..422e3234198 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -28,7 +28,7 @@ The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-clo - Ensure you are using dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade. - Avoid using SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections. - Avoid using [PrivateLink](/docs/cloud/secure/about-privatelink). -- Avoid using Single sign-on (SSO) for Snowflake or SSH tunnels for Redshift. +- Avoid using Single sign-on (SSO) if developing for the [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl). ## Install dbt Cloud CLI From 4a23df57bdfcf2558823167891e9f46252b03dc4 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 27 Oct 2023 16:58:56 +0100 Subject: [PATCH 05/14] Update website/docs/docs/cloud/cloud-cli-installation.md --- website/docs/docs/cloud/cloud-cli-installation.md | 1 - 1 file changed, 1 deletion(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 422e3234198..31db1408983 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -28,7 +28,6 @@ The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-clo - Ensure you are using dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade. - Avoid using SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections. - Avoid using [PrivateLink](/docs/cloud/secure/about-privatelink). -- Avoid using Single sign-on (SSO) if developing for the [dbt Semantic Layer](/docs/use-dbt-semantic-layer/dbt-sl). ## Install dbt Cloud CLI From d0b0706bf6d0e5994a6ff099ac058320ee02cf74 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Fri, 27 Oct 2023 17:30:00 +0100 Subject: [PATCH 06/14] Update website/docs/reference/dbt-commands.md --- website/docs/reference/dbt-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/reference/dbt-commands.md b/website/docs/reference/dbt-commands.md index 587ad7687ac..1d7ff94032a 100644 --- a/website/docs/reference/dbt-commands.md +++ b/website/docs/reference/dbt-commands.md @@ -24,7 +24,7 @@ You can run dbt commands in your specific tool by prefixing them with `dbt`. Fo | [clean](/reference/commands/clean) | Deletes artifacts present in the dbt project | All | All [supported versions](/docs/dbt-versions/core) | | [clone](/reference/commands/clone) | Clone selected models from the specified state | All | Requires [dbt v1.6 or higher](/docs/dbt-versions/core) | | [compile](/reference/commands/compile) | Compiles (but does not run) the models in a project | All | All [supported versions](/docs/dbt-versions/core) | -| [debug](/reference/commands/debug) | Debugs dbt connections and projects | All | All [supported versions](/docs/dbt-versions/core) | +| [debug](/reference/commands/debug) | Debugs dbt connections and projects | dbt Cloud IDE
dbt Core | All [supported versions](/docs/dbt-versions/core) | | [deps](/reference/commands/deps) | Downloads dependencies for a project | All | All [supported versions](/docs/dbt-versions/core) | | [docs](/reference/commands/cmd-docs) | Generates documentation for a project | All | All [supported versions](/docs/dbt-versions/core) | | help | Displays help information for any command | dbt Core
dbt Cloud CLI | All [supported versions](/docs/dbt-versions/core) | From 83e349ff0afbb573fe655c59d7111f792439ebde Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:52:44 +0000 Subject: [PATCH 07/14] Update cloud-cli-installation.md --- website/docs/docs/cloud/cloud-cli-installation.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 31db1408983..36dff748475 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -26,9 +26,8 @@ dbt commands are run against dbt Cloud's infrastructure and benefit from: The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-cloud/regions-ip-addresses) and for both multi-tenant and single-tenant accounts (Azure single-tenant not supported at this time). - Ensure you are using dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade. -- Avoid using SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections. -- Avoid using [PrivateLink](/docs/cloud/secure/about-privatelink). - +- SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections, [PrivateLink](/docs/cloud/secure/about-privatelink), and [Single sign-on (SSO)](/docs/cloud/manage-access/sso-overview) isn't supported yet. +- ## Install dbt Cloud CLI You can install the dbt Cloud CLI on the command line by using one of these methods. From a747480b67bcafd87c715e2f63d90380c895ee13 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:53:14 +0000 Subject: [PATCH 08/14] Update cloud-cli-installation.md --- website/docs/docs/cloud/cloud-cli-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 36dff748475..f918ce1b611 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -27,7 +27,7 @@ The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-clo - Ensure you are using dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade. - SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections, [PrivateLink](/docs/cloud/secure/about-privatelink), and [Single sign-on (SSO)](/docs/cloud/manage-access/sso-overview) isn't supported yet. -- + ## Install dbt Cloud CLI You can install the dbt Cloud CLI on the command line by using one of these methods. From b6139747289c2e82ce1496837e56d8b86cb035c3 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 31 Oct 2023 10:56:56 +0000 Subject: [PATCH 09/14] Update website/docs/docs/cloud/cloud-cli-installation.md --- website/docs/docs/cloud/cloud-cli-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index f918ce1b611..af6ce956485 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -26,7 +26,7 @@ dbt commands are run against dbt Cloud's infrastructure and benefit from: The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-cloud/regions-ip-addresses) and for both multi-tenant and single-tenant accounts (Azure single-tenant not supported at this time). - Ensure you are using dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade. -- SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections, [PrivateLink](/docs/cloud/secure/about-privatelink), and [Single sign-on (SSO)](/docs/cloud/manage-access/sso-overview) isn't supported yet. +- Note that SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections, [PrivateLink](/docs/cloud/secure/about-privatelink), and [Single sign-on (SSO)](/docs/cloud/manage-access/sso-overview) isn't supported yet. ## Install dbt Cloud CLI From c7a9497ee308722ec7c1c104ca765875fb069fa1 Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 31 Oct 2023 11:06:07 +0000 Subject: [PATCH 10/14] Update configure-cloud-cli.md --- website/docs/docs/cloud/configure-cloud-cli.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/cloud/configure-cloud-cli.md b/website/docs/docs/cloud/configure-cloud-cli.md index c05749fd016..7ac033b84c9 100644 --- a/website/docs/docs/cloud/configure-cloud-cli.md +++ b/website/docs/docs/cloud/configure-cloud-cli.md @@ -87,10 +87,10 @@ To set environment variables in the dbt Cloud CLI for your dbt project: ## 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. +- The dbt Cloud CLI uses the same set of [dbt commands](/reference/dbt-commands) and [MetricFlow commands](/docs/build/metricflow-commands) as dbt Core to execute the commands you provide. +- It allows you to automatically defer 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 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. + - Project dependencies instantly connect to and reference (or `ref`) public models defined in other projects. 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 95789bced052880cfc45a086be5839e577b7c411 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Wed, 1 Nov 2023 16:55:25 +0000 Subject: [PATCH 11/14] tweak --- .../docs/docs/cloud/cloud-cli-installation.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index af6ce956485..60d9fc1db86 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -43,7 +43,9 @@ 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. +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. + +To use both dbt Cloud CLI and dbt Core — Have both the dbt Cloud CLI and dbt Core installed simultaneously to meet your needs. To avoid conflicts, alias the dbt Cloud CLI as "dbt-cloud." For more details, check the FAQs if your operating system experiences path conflicts. 1. Run the following command to verify that you don't already have dbt Core installed: @@ -144,14 +146,12 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa -If you already have dbt Core installed, you can install the dbt Cloud CLI using pip. Here are some considerations: +If you already have dbt Core installed, the dbt Cloud CLI may conflict. Here are some considerations: -- **Prevent conflicts**
- To prevent overwriting dbt Core, avoid installing the dbt Cloud CLI with `pip`. Instead, consider using the native installation method (Homebrew) and configure your PATH or create a new virtual environment.
-- **Use both dbt Cloud CLI and dbt Core**
- Have both the dbt Cloud CLI and dbt Core installed simultaneously to meet your needs. 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.
-- **Switch from the dbt Cloud CLI to dbt Core**
- If you've already installed the dbt Cloud CLI and need to switch back to dbt Core: +- **Prevent conflicts**
If you want to use `pip`, create a new virtual environment.

+- **Use both dbt Cloud CLI and dbt Core**
If you use Homebrew, consider aliasing the dbt Cloud CLI as "dbt-cloud" to avoid conflict. For more details, check the [FAQs](#faqs) if your operating system experiences path conflicts.

+- **Switch from the dbt Cloud CLI to dbt Core**
+ If you've already installed the dbt Cloud CLI and need to switch back to dbt Core:
- Uninstall the dbt Cloud CLI using the command: `pip uninstall dbt` - Reinstall dbt Core using the following command, replacing "adapter_name" with the appropriate adapter name: ```shell @@ -196,11 +196,11 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`. pip3 install dbt ``` -3. (Optional) To revert back to dbt Core, first uninstall both the dbt Cloud CLI and dbt Core. Then reinstall dbt Core using the version from Step 1. +1. (Optional) To revert back to dbt Core, first uninstall both the dbt Cloud CLI and dbt Core. Then reinstall dbt Core. ```bash pip3 uninstall dbt-core dbt - pip3 install dbt-core==VERSION + pip install dbt-adapter_name --force-reinstall ``` 4. After you've verified the installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. You can then 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 validate your models and tests. @@ -211,8 +211,6 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`. - - ## Update dbt Cloud CLI The following instructions explain how to update the dbt CLoud CLI to the latest version depending on your operating system. @@ -250,10 +248,12 @@ To update: -## dbt Cloud CLI extensions -Command line extensions are additional functionalities that you can add to a command line tool or shell environment. These extensions expand the capabilities of the CLI, making it more versatile and efficient. +## Using VS Code extensions + +Visual Studio (VS) Code extensions enhance command line tools by adding extra functionalities. The dbt Cloud CLI is fully compatible with dbt Core, however it doesn't support some dbt Core APIs required by certain tools like VS Code extensions. + +To use these extensions, such as dbt-power-user, with the dbt Cloud CLI, you can install it using Homebrew (along with dbt Core) and create an alias to run the dbt Cloud CLI as `dbt-cloud`. This allows dbt-power-user to continue to function alongside the dbt Cloud CLI. -The dbt Cloud CLI doesn't currently support extensions, such as SQLFluff or dbt-power-user, during the public preview period. This is because..... ## FAQs From f461616bc48d66aacd31d529294b66f61c0224e9 Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Wed, 1 Nov 2023 18:31:14 +0000 Subject: [PATCH 12/14] fold greg's feedback --- .../docs/docs/cloud/cloud-cli-installation.md | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 5a50fa9832f..34d564b5ae0 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -45,8 +45,6 @@ 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. -To use both dbt Cloud CLI and dbt Core — Have both the dbt Cloud CLI and dbt Core installed simultaneously to meet your needs. To avoid conflicts, alias the dbt Cloud CLI as "dbt-cloud." For more details, check the FAQs if your operating system experiences path conflicts. - 1. Run the following command to verify that you don't already have dbt Core installed: ```bash @@ -250,9 +248,9 @@ To update: ## Using VS Code extensions -Visual Studio (VS) Code extensions enhance command line tools by adding extra functionalities. The dbt Cloud CLI is fully compatible with dbt Core, however it doesn't support some dbt Core APIs required by certain tools like VS Code extensions. +Visual Studio (VS) Code extensions enhance command line tools by adding extra functionalities. The dbt Cloud CLI is fully compatible with dbt Core, however it doesn't support some dbt Core APIs required by certain tools, for example VS Code extensions. -To use these extensions, such as dbt-power-user, with the dbt Cloud CLI, you can install it using Homebrew (along with dbt Core) and create an alias to run the dbt Cloud CLI as `dbt-cloud`. This allows dbt-power-user to continue to function alongside the dbt Cloud CLI. +To use these extensions, such as dbt-power-user, with the dbt Cloud CLI, you can install it using Homebrew (along with dbt Core) and create an alias to run the dbt Cloud CLI as `dbt-cloud`. This allows dbt-power-user to continue to work alongside the dbt Cloud CLI. ## FAQs @@ -266,18 +264,33 @@ The dbt Cloud CLI and dbt Core How do I run both the dbt Cloud CLI and dbt Core? -For compatibility, both the dbt Cloud CLI and dbt Core are invoked by running dbt. This can create path conflicts if your operating system selects one over the other based on your $PATH environment variable (settings). +For compatibility, both the dbt Cloud CLI and dbt Core are invoked by running dbt. This can create path conflicts if your operating system selects one over the other based on your $PATH environment variable (settings).
If you have dbt Core installed locally, either: -- Install using the pip3 install dbt [pip](/docs/cloud/cloud-cli-installation?install=pip#install-dbt-cloud-cli) command, or -- Install natively, however ensure you deactivate your Python environment or uninstall it using `pip uninstall dbt` before proceeding. - -1. (Advanced users) Install natively, but modify the $PATH environment variable to correctly point to the dbt Cloud CLI binary to use both dbt Cloud CLI and dbt Core together. +1. Install using the pip3 install dbt [pip](/docs/cloud/cloud-cli-installation?install=pip#install-dbt-cloud-cli) command, or +2. Install natively, ensuring you either deactivate the virtual environment containing dbt Core or create an alias for the dbt Cloud CLI. +3. (Advanced users) Install natively, but modify the $PATH environment variable to correctly point to the dbt Cloud CLI binary to use both dbt Cloud CLI and dbt Core together. You can always uninstall the dbt Cloud CLI to return to using dbt Core.
+
+How to create an alias? +To create an alias for the dbt Cloud CLI:
+ +1. Open your shell's profile configuration file. Deepending on your shell and system, this could be ~/.bashrc, ~/.bash_profile, ~/.zshrc, or another file.
+ +2. Add an alias that points to the dbt Cloud CLI binary. For example:alias dbt-cloud="path_to_dbt_cloud_cli_binary + + Replace path_to_dbt_cloud_cli_binary with the actual path to the dbt Cloud CLI binary. With this alias, you can use the command dbt-cloud to invoke the dbt Cloud CLI.
+ +3. Save the file and then either restart your shell or run source on the profile file to apply the changes. +As an example, in bash you would run: source ~/.bashrc
+ +This alias will allow you to use the dbt-cloud command to invoke the dbt Cloud CLI while having dbt Core installed natively. +
+
Why am I receiving a Session occupied error? If you've ran a dbt command and receive a Session occupied error, you can reattach to your existing session with dbt reattach and then press Control-C and choose to cancel the invocation. From 52207dfc21325bd286e319750f544eb65e5cec9b Mon Sep 17 00:00:00 2001 From: mirnawong1 <89008547+mirnawong1@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:37:13 +0000 Subject: [PATCH 13/14] Update website/docs/docs/cloud/cloud-cli-installation.md --- website/docs/docs/cloud/cloud-cli-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index 34d564b5ae0..e66ca28a285 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -26,7 +26,7 @@ dbt commands are run against dbt Cloud's infrastructure and benefit from: The dbt Cloud CLI is available in all [deployment regions](/docs/cloud/about-cloud/regions-ip-addresses) and for both multi-tenant and single-tenant accounts (Azure single-tenant not supported at this time). - Ensure you are using dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade. -- Note that SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections, [PrivateLink](/docs/cloud/secure/about-privatelink), and [Single sign-on (SSO)](/docs/cloud/manage-access/sso-overview) isn't supported yet. +- Note that SSH tunneling for [Postgres and Redshift](/docs/cloud/connect-data-platform/connect-redshift-postgresql-alloydb) connections and [Single sign-on (SSO)](/docs/cloud/manage-access/sso-overview) doesn't support the dbt Cloud CLI yet. ## Install dbt Cloud CLI From 4d194ca4b721406b3eb7ce6a06fd42f62b6417ac Mon Sep 17 00:00:00 2001 From: mirnawong1 Date: Wed, 8 Nov 2023 12:34:15 +0000 Subject: [PATCH 14/14] fold greg's feedback --- .../docs/docs/cloud/cloud-cli-installation.md | 36 +++++++++---------- .../docs/docs/cloud/configure-cloud-cli.md | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index e66ca28a285..70ae74c3df7 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -45,26 +45,24 @@ 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 you don't already have dbt Core installed: +1. 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 remove dbt Core from your machine.
+ - If you see a `dbt not found`, you're good to go. If the dbt help text appears, use `pip uninstall dbt` to remove dbt Core from your system.
2. Install the dbt Cloud CLI with Homebrew: - First, remove the dbt-labs tap, the separate repository for packages, from Homebrew. This prevents 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: + - Then, 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 ``` + If you have multiple taps, use `brew install dbt-labs/dbt-cli/dbt`. 3. Verify your installation by running `dbt --help` in the command line. If you see the following output, your installation is correct: ```bash @@ -76,7 +74,7 @@ Before you begin, make sure you have [Homebrew installed](http://brew.sh/) in yo * Note that you no longer need to run the `dbt deps` command when your environment starts. This step was previously required during initialization. However, you should still run `dbt deps` if you make any changes to your `packages.yml` file. 4. After you've verified the 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 validate your models and tests. - * 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 locally on your machine. + @@ -105,7 +103,6 @@ Note that if you are using VS Code, you must restart it to pick up modified envi * Note that you no longer need to run the `dbt deps` command when your environment starts. This step was previously required during initialization. However, you should still run `dbt deps` if you make any 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. - * 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 locally on your machine. @@ -138,7 +135,6 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa * Note that you no longer need to run the `dbt deps` command when your environment starts. This step was previously required during initialization. However, you should still run `dbt deps` if you make any 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. - * 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 locally on your machine. @@ -146,9 +142,9 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa If you already have dbt Core installed, the dbt Cloud CLI may conflict. Here are some considerations: -- **Prevent conflicts**
If you want to use `pip`, create a new virtual environment.

-- **Use both dbt Cloud CLI and dbt Core**
If you use Homebrew, consider aliasing the dbt Cloud CLI as "dbt-cloud" to avoid conflict. For more details, check the [FAQs](#faqs) if your operating system experiences path conflicts.

-- **Switch from the dbt Cloud CLI to dbt Core**
+- **Prevent conflicts**
Use both the dbt Cloud CLI and dbt Core with `pip` and create a new virtual environment.

+- **Use both dbt Cloud CLI and dbt Core with brew or native installs**
If you use Homebrew, consider aliasing the dbt Cloud CLI as "dbt-cloud" to avoid conflict. For more details, check the [FAQs](#faqs) if your operating system experiences path conflicts.

+- **Reverting back to dbt Core from the dbt Cloud CLI**
If you've already installed the dbt Cloud CLI and need to switch back to dbt Core:
- Uninstall the dbt Cloud CLI using the command: `pip uninstall dbt` - Reinstall dbt Core using the following command, replacing "adapter_name" with the appropriate adapter name: @@ -202,7 +198,6 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`. ``` 4. After you've verified the installation, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. You can then 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 validate your models and tests. - * 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 locally on your machine. @@ -211,7 +206,7 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`. ## Update dbt Cloud CLI -The following instructions explain how to update the dbt CLoud CLI to the latest version depending on your operating system. +The following instructions explain how to update the dbt Cloud CLI to the latest version depending on your operating system. During the public preview period, we recommend updating before filing a bug report. This is because the API is subject to breaking changes. @@ -250,7 +245,7 @@ To update: Visual Studio (VS) Code extensions enhance command line tools by adding extra functionalities. The dbt Cloud CLI is fully compatible with dbt Core, however it doesn't support some dbt Core APIs required by certain tools, for example VS Code extensions. -To use these extensions, such as dbt-power-user, with the dbt Cloud CLI, you can install it using Homebrew (along with dbt Core) and create an alias to run the dbt Cloud CLI as `dbt-cloud`. This allows dbt-power-user to continue to work alongside the dbt Cloud CLI. +To use these extensions, such as dbt-power-user, with the dbt Cloud CLI, you can install it using Homebrew (along with dbt Core) and create an alias to run the dbt Cloud CLI as `dbt-cloud`. This allows dbt-power-user to continue to invoke dbt Core under the hood, alongside the dbt Cloud CLI. ## FAQs @@ -268,7 +263,7 @@ For compatibility, both the dbt Cloud CLI and dbt Core are invoked by running pip3 install dbt [pip](/docs/cloud/cloud-cli-installation?install=pip#install-dbt-cloud-cli) command, or +1. Install using the pip3 install dbt [pip](/docs/cloud/cloud-cli-installation?install=pip#install-dbt-cloud-cli) command. 2. Install natively, ensuring you either deactivate the virtual environment containing dbt Core or create an alias for the dbt Cloud CLI. 3. (Advanced users) Install natively, but modify the $PATH environment variable to correctly point to the dbt Cloud CLI binary to use both dbt Cloud CLI and dbt Core together. @@ -279,15 +274,20 @@ You can always uninstall the dbt Cloud CLI to return to using dbt Core. How to create an alias? To create an alias for the dbt Cloud CLI:
-1. Open your shell's profile configuration file. Deepending on your shell and system, this could be ~/.bashrc, ~/.bash_profile, ~/.zshrc, or another file.
+1. Open your shell's profile configuration file. Depending on your shell and system, this could be ~/.bashrc, ~/.bash_profile, ~/.zshrc, or another file.
2. Add an alias that points to the dbt Cloud CLI binary. For example:alias dbt-cloud="path_to_dbt_cloud_cli_binary - Replace path_to_dbt_cloud_cli_binary with the actual path to the dbt Cloud CLI binary. With this alias, you can use the command dbt-cloud to invoke the dbt Cloud CLI.
+ Replace path_to_dbt_cloud_cli_binary with the actual path to the dbt Cloud CLI binary, which is /opt/homebrew/bin/dbt. With this alias, you can use the command dbt-cloud to invoke the dbt Cloud CLI.
3. Save the file and then either restart your shell or run source on the profile file to apply the changes. As an example, in bash you would run: source ~/.bashrc
+1. Test and use the alias to run commands:
+ - To run the dbt Cloud CLI, use the dbt-cloud command: dbt-cloud command_name. Replace 'command_name' with the specific dbt command you want to execute.
+ - To run the dbt Core, use the dbt command: dbt command_name. Replace 'command_name' with the specific dbt command you want to execute.
+ + This alias will allow you to use the dbt-cloud command to invoke the dbt Cloud CLI while having dbt Core installed natively.
diff --git a/website/docs/docs/cloud/configure-cloud-cli.md b/website/docs/docs/cloud/configure-cloud-cli.md index 7ac033b84c9..35f82cff8cf 100644 --- a/website/docs/docs/cloud/configure-cloud-cli.md +++ b/website/docs/docs/cloud/configure-cloud-cli.md @@ -14,7 +14,7 @@ import CloudCLIFlag from '/snippets/_cloud-cli-flag.md'; ## Prerequisites - 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. + - **Note** — If you're using the dbt Cloud CLI, you can connect to your [data platform](/docs/cloud/connect-data-platform/about-connections) 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 be on dbt version 1.5 or higher. Refer to [dbt Cloud versions](/docs/dbt-versions/upgrade-core-in-cloud) to upgrade.