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
32 changes: 31 additions & 1 deletion website/docs/reference/commands/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ 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

<VersionBlock firstVersion="1.6">

`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`).

To test the data platform connection _only_, add the `--connection` flag at the end of the command. For example, `dbt debug --connection` will only test the connection to the data platform and skip the other checks `dbt debug` looks for.

*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 🤩


The `--config-dir` option to `dbt debug` will show the configured location for the `profiles.yml` file and exit:

Expand All @@ -14,3 +24,23 @@ To view your profiles.yml file, run:

open /Users/alice/.dbt
```

</VersionBlock>


<VersionBlock lastVersion="1.5">

`dbt debug` is a utility function to test the database connection and show information for debugging purposes.

*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.

The `--config-dir` option to `dbt debug` will show the configured location for the `profiles.yml` file and exit:

```text
$ dbt debug --config-dir
To view your profiles.yml file, run:

open /Users/alice/.dbt
```

</VersionBlock>