-
Notifications
You must be signed in to change notification settings - Fork 982
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this pr adds the dbt environment command and its flags to the docs site for the cloud cli. it also sets it up so that may add more flags/commands if necessary. it has been added in the following pages: - https://docs.getdbt.com/reference/dbt-commands -- added to the table list - https://docs.getdbt.com/reference/commands/dbt-environment -- created a brand new page - https://docs.getdbt.com/docs/cloud/cloud-cli-installation -- in the installation steps - https://docs.getdbt.com/docs/cloud/configure-cloud-cli -- in the config steps PR also renames the sidebar so the cloud cli is less repeated. add;l details [provided here](https://www.notion.so/dbtlabs/dbt-env-show-details-82c33bf72bb34142ac7511ecebcf1b66) on the command and the next steps.
- Loading branch information
Showing
5 changed files
with
112 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters