Skip to content
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

dbt debug --connection flag #3731

Merged
merged 11 commits into from
Jul 15, 2023
22 changes: 20 additions & 2 deletions website/docs/reference/commands/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,27 @@ sidebar_label: "debug"
id: "debug"
---

`dbt debug` is a utility function to test the database connection and show information for debugging purposes. Not to be confused with [debug-level logging](/reference/global-configs/about-global-configs#debug-level-logging) via the `--debug` option which increases verbosity.
<Changelog>
dbeatty10 marked this conversation as resolved.
Show resolved Hide resolved
* dbt v1.6: The <code>dbt debug --connection</code> flag is introduced to only test the data platform connection in your profile.
dbeatty10 marked this conversation as resolved.
Show resolved Hide resolved
</Changelog>
dbeatty10 marked this conversation as resolved.
Show resolved Hide resolved

The `--config-dir` option to `dbt debug` will show the configured location for the `profiles.yml` file and exit:
`dbt debug` is a utility function to test the database connection and display information for debugging purposes, such as the validity of your project file and your installation of any requisite dependencies (like `git` when you run `dbt deps`).

*Note: Not to be confused with [debug-level logging](/reference/global-configs/about-global-configs#debug-level-logging) via the `--debug` option which increases verbosity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is harder to understand when it's further down like this:

https://deploy-preview-3731--docs-getdbt-com.netlify.app/reference/commands/debug?version=1.6

image

I wonder if it could be moved somewhere else or updated in some other way?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I committed some attempts to separate out the examples from the main description.

Sorry if I butchered your PR @mirnawong1

Copy link
Contributor Author

@mirnawong1 mirnawong1 Jul 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I LOVE this! So much easier to understand and thank you so much for editing it @dbeatty10 ! I didn't realize there was more than two options so this looks perfect 🤩


### Example usage

<VersionBlock firstVersion="1.6">

Only test the connection to the data platform and skip the other checks `dbt debug` looks for:

```shell
$ dbt debug --connection
```

</VersionBlock>

Show the configured location for the `profiles.yml` file and exit:

```text
$ dbt debug --config-dir
Expand Down