-
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.
Merge branch 'current' into add-dbt-risingwave
- Loading branch information
Showing
12 changed files
with
190 additions
and
25 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] --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/[email protected] --dry-run | ||
|
||
``` | ||
</VersionBlock> |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.