-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding dbt env command #4792
Merged
Merged
adding dbt env command #4792
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
42d3fc6
adding dbt env show
mirnawong1 244baf7
Merge branch 'current' into mwong-env-var-cmd
mirnawong1 7d8929a
Merge branch 'current' into mwong-env-var-cmd
mirnawong1 c26ba94
Update website/docs/reference/commands/dbt-environment.md
mirnawong1 058bcc9
Update website/docs/reference/commands/dbt-environment.md
mirnawong1 a1b1811
Merge branch 'current' into mwong-env-var-cmd
mirnawong1 cf84bfc
Update website/docs/reference/commands/dbt-environment.md
mirnawong1 f40599b
Update website/docs/reference/commands/dbt-environment.md
mirnawong1 61fedc1
Update website/docs/reference/commands/dbt-environment.md
mirnawong1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cesher one last question - what is the difference between local config and dbt cloud config in this context? i think i understand the difference in the 'git' context but wanted to clarify this for users.
is it:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to merge pr and address this when clarified in the shipped channel