diff --git a/website/docs/docs/build/metrics-overview.md b/website/docs/docs/build/metrics-overview.md index f6844c60498..4d74634a4b8 100644 --- a/website/docs/docs/build/metrics-overview.md +++ b/website/docs/docs/build/metrics-overview.md @@ -20,7 +20,7 @@ The keys for metrics definitions are: | `config` | Provide the specific configurations for your metric. | Optional | | `label` | The display name for your metric. This value will be shown in downstream tools. | Required | | `filter` | You can optionally add a filter string to any metric type, applying filters to dimensions, entities, or time dimensions during metric computation. Consider it as your WHERE clause. | Optional | -| `meta` | Additional metadata you want to add to your metric. | Optional | + Here's a complete example of the metrics spec configuration: diff --git a/website/docs/docs/cloud/cloud-cli-installation.md b/website/docs/docs/cloud/cloud-cli-installation.md index edf6511d4b8..8112c8f3bd1 100644 --- a/website/docs/docs/cloud/cloud-cli-installation.md +++ b/website/docs/docs/cloud/cloud-cli-installation.md @@ -1,6 +1,6 @@ --- title: Install dbt Cloud CLI -sidebar_label: "Install dbt Cloud CLI" +sidebar_label: "Installation" id: cloud-cli-installation description: "Instructions for installing and configuring dbt Cloud CLI" pagination_next: "docs/cloud/configure-cloud-cli" @@ -75,7 +75,7 @@ Before you begin, make sure you have [Homebrew installed](http://brew.sh/) in yo 4. Clone your repository to your local computer using `git clone`. For example, to clone a GitHub repo using HTTPS format, run `git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`. -5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo. +5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration or `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo. @@ -106,7 +106,7 @@ Note that if you are using VS Code, you must restart it to pick up modified envi 4. Clone your repository to your local computer using `git clone`. For example, to clone a GitHub repo using HTTPS format, run `git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`. -5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo. +5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration or `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo. @@ -140,7 +140,7 @@ Advanced users can configure multiple projects to use the same Cloud CLI executa 4. Clone your repository to your local computer using `git clone`. For example, to clone a GitHub repo using HTTPS format, run `git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`. -5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo. +5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration or `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo. @@ -205,7 +205,7 @@ We recommend using virtual environments (venv) to namespace `cloud-cli`. 4. Clone your repository to your local computer using `git clone`. For example, to clone a GitHub repo using HTTPS format, run `git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY`. -5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo. +5. After cloning your repo, [configure](/docs/cloud/configure-cloud-cli) the dbt Cloud CLI for your dbt Cloud project. This lets you run dbt commands like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration or `dbt compile` to compile your project and validate models and tests. You can also add, edit, and synchronize files with your repo. @@ -253,12 +253,12 @@ 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. -You can use extensions like [dbt-power-user](https://www.dbt-power-user.com/) with the dbt Cloud CLI by following these steps: +You can use extensions like [dbt-power-user](https://marketplace.visualstudio.com/items?itemName=innoverio.vscode-dbt-power-user) with the dbt Cloud CLI by following these steps: - [Install](/docs/cloud/cloud-cli-installation?install=brew) it using Homebrew along with dbt Core. - [Create an alias](#faqs) to run the dbt Cloud CLI as `dbt-cloud`. -This setup allows dbt-power-user to continue to work with dbt Core in the background, alongside the dbt Cloud CLI. +This setup allows dbt-power-user to continue to work with dbt Core in the background, alongside the dbt Cloud CLI. For more, check the dbt Power User [documentation](https://docs.myaltimate.com/). ## FAQs diff --git a/website/docs/docs/cloud/configure-cloud-cli.md b/website/docs/docs/cloud/configure-cloud-cli.md index a442a6e6ad1..acd77bfd23b 100644 --- a/website/docs/docs/cloud/configure-cloud-cli.md +++ b/website/docs/docs/cloud/configure-cloud-cli.md @@ -1,8 +1,8 @@ --- -title: Configure dbt Cloud CLI +title: Configure and use the dbt Cloud CLI id: configure-cloud-cli description: "Instructions on how to configure the dbt Cloud CLI" -sidebar_label: "Configure dbt Cloud CLI" +sidebar_label: "Configuration and usage" pagination_next: null --- @@ -75,7 +75,9 @@ 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`. -6. You can now [use the dbt Cloud CLI](#use-the-dbt-cloud-cli) and run [dbt commands](/reference/dbt-commands) like `dbt compile`. With your repo recloned, you can add, edit, and sync files with your repo. +6. You should now be able to [use the dbt Cloud CLI](#use-the-dbt-cloud-cli) and run [dbt commands](/reference/dbt-commands) like [`dbt environment show`](/reference/commands/dbt-environment) to view your dbt Cloud configuration details or `dbt compile` to compile models in your dbt project. + +With your repo recloned, you can add, edit, and sync files with your repo. ### Set environment variables @@ -89,7 +91,7 @@ To set environment variables in the dbt Cloud CLI for your dbt project: ## Use the dbt Cloud CLI -- 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. +- 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. For example, use the [`dbt environment`](/reference/commands/dbt-environment) command to view your dbt Cloud configuration details. - 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. You don't need to execute or analyze these upstream models yourself. Instead, you treat them as an API that returns a dataset. diff --git a/website/docs/docs/collaborate/govern/project-dependencies.md b/website/docs/docs/collaborate/govern/project-dependencies.md index 80dee650698..5fd3a970a55 100644 --- a/website/docs/docs/collaborate/govern/project-dependencies.md +++ b/website/docs/docs/collaborate/govern/project-dependencies.md @@ -33,6 +33,7 @@ Refer to the [FAQs](#faqs) for more info. In order to add project dependencies and resolve cross-project `ref`, you must: - Use dbt v1.6 or higher for **both** the upstream ("producer") project and the downstream ("consumer") project. +- Define models in an upstream ("producer") project that are configured with [`access: public`](/reference/resource-configs/access) - Have a deployment environment in the upstream ("producer") project [that is set to be your production environment](/docs/deploy/deploy-environments#set-as-production-environment) - Have a successful run of the upstream ("producer") project - Have a multi-tenant or single-tenant [dbt Cloud Enterprise](https://www.getdbt.com/pricing) account (Azure ST is not supported but coming soon) diff --git a/website/docs/reference/commands/dbt-environment.md b/website/docs/reference/commands/dbt-environment.md new file mode 100644 index 00000000000..79683640488 --- /dev/null +++ b/website/docs/reference/commands/dbt-environment.md @@ -0,0 +1,98 @@ +--- +title: "About dbt environment command" +sidebar_label: "environment" +id: dbt-environment +--- + +The `dbt environment` command enables you to interact with your dbt Cloud environment. Use the command for: + +- Viewing your local configuration details (account ID, active project ID, deployment environment, and more). +- Viewing your dbt Cloud configuration details (environment ID, environment name, connection type, and more). + +This guide lists all the commands and options you can use with `dbt environment` in the [dbt Cloud CLI](/docs/cloud/cloud-cli-installation). To use them, add a command or option like this: `dbt environment [command]` or use the shorthand `dbt env [command]`. + +### dbt environment show + +`show` command — To view your local and dbt Cloud configuration details. To run the command with the dbt Cloud CLI, type one of the following commands, including the shorthand: + +```shell +dbt environment show +``` +```shell +dbt env show +``` + +The command returns the following information: + +```bash +❯ dbt env show +Local Configuration: + Active account ID 185854 + Active project ID 271692 + Active host name cloud.getdbt.com + dbt_cloud.yml file path /Users/cesar/.dbt/dbt_cloud.yml + dbt_project.yml file path /Users/cesar/git/cloud-cli-test-project/dbt_project.yml + dbt Cloud CLI version 0.35.7 + OS info darwin arm64 + +Cloud Configuration: + Account ID 185854 + Project ID 271692 + Project name Snowflake + Environment ID 243762 + Environment name Development + Defer environment ID [N/A] + dbt version 1.6.0-latest + Target name default + Connection type snowflake + +Snowflake Connection Details: + Account ska67070 + Warehouse DBT_TESTING_ALT + Database DBT_TEST + Schema CLOUD_CLI_TESTING + Role SYSADMIN + User dbt_cloud_user + Client session keep alive false +``` + +Note, that dbt Cloud won't return anything that is a secret key and will return an 'NA' for any field that isn't configured. + +### dbt environment flags + +Use the following flags (or options) with the `dbt environment` command: + +- `-h`, `--help` — To view the help documentation for a specific command in your command line interface. + + ```shell + dbt environment [command] --help + dbt environment [command] -h + ``` + + The `--help` flag returns the following information: + + ```bash + ❯ dbt help environment + Interact with dbt environments + + Usage: + dbt environment [command] + + Aliases: + environment, env + + Available Commands: + show Show the working environment + + Flags: + -h, --help help for environment + + Use "dbt environment [command] --help" for more information about a command. + ``` + + For example, to view the help documentation for the `show` command, type one of the following commands, including the shorthand: + + ```shell + dbt environment show --help + dbt env show -h + ``` diff --git a/website/docs/reference/commands/deps.md b/website/docs/reference/commands/deps.md index 1a3562e3172..900e4ae0041 100644 --- a/website/docs/reference/commands/deps.md +++ b/website/docs/reference/commands/deps.md @@ -68,8 +68,6 @@ There are two flags related to `package-lock.yml`: - `dbt deps --lock` — creates or updates the `package-lock.yml` file but does not install the packages. - `dbt deps --upgrade` — creates or updates the `package-lock.yml` file with the most recent dependencies from `packages.yml`. Also install the packages unless the `--lock` flag is also passed. -The `--add-package` flag allows you to add a package to the `packages.yml` with configurable `--version` and `--source` information. The `--dry-run` flag, when set to `False`(default), recompiles the `package-lock.yml` file after a new package is added to the `packages.yml` file. Set the flag to `True` for the changes to not persist. - Examples of the `--add-package` flag: ```shell # add package from hub (--source arg defaults to "hub") @@ -83,9 +81,5 @@ dbt deps --add-package https://github.com/fivetran/dbt_amplitude@v0.3.0 --source # add package from local dbt deps --add-package /opt/dbt/redshift --source local - -# add package to packages.yml and package-lock.yml WITHOUT actually installing dependencies -dbt deps --add-package dbt-labs/dbt_utils@1.0.0 --dry-run - ``` diff --git a/website/docs/reference/dbt-commands.md b/website/docs/reference/dbt-commands.md index 4cb20051ea2..2e534049dce 100644 --- a/website/docs/reference/dbt-commands.md +++ b/website/docs/reference/dbt-commands.md @@ -17,7 +17,7 @@ All commands in the table are compatible with either the dbt Cloud IDE, dbt Clou You can run dbt commands in your specific tool by prefixing them with `dbt`. For example, to run the `test` command, type `dbt test`. -| Command | Description | Compatible tools | Version | +| Command | Description | Compatible tools |