You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to use dbt debug for connection testing. Currently, debug also includes checks for:
Valid profiles.yml file
Valid dbt_project.yml file
git as an installed dependency (for deps)
dbt can connect and submit a "debug" query to the selected profile
Of those checks, we really only need the last one for connection testing. Ideally, we'd be able to skip the other checks (perhaps by passing a flag?) and return success/error (programmatically & as CLI exit code) on the basis of the "debug" query only.
If we had to hack this today, it would be sorta possible by examining the structured events (DebugCmdOut) returned from the debug command, but this hardly feels like a stable interface.
Why dbt debug?
Why not just an interactive query (new preview command) with the query hard-coded to select 1 as id? Reasons to prefer:
An alternative suggestion would be to add a command dbt test_connection that would use the selected profile. I can open a separate issue to surface this alternative way.
Just going by what we see here, I would say we communicate that dbt debug exists to support the validation of a dbt environment. Having a flag that skipped those validation steps would mirror the `git commit --no-verify` workflow. Basically, just validate that the connection makes sense. I worry that if we create a new command which under the hood is leveraging the same code, we are inviting unclear interfaces at the executable level
We already have a flag that serves as an example of what additional flag we might add to accomplish the desired behavior outlined in the issue
Much older issue in the same vein: #3735
It should be possible to use
dbt debug
for connection testing. Currently,debug
also includes checks for:profiles.yml
filedbt_project.yml
filegit
as an installed dependency (fordeps
)Of those checks, we really only need the last one for connection testing. Ideally, we'd be able to skip the other checks (perhaps by passing a flag?) and return success/error (programmatically & as CLI exit code) on the basis of the "debug" query only.
If we had to hack this today, it would be sorta possible by examining the structured events (
DebugCmdOut
) returned from thedebug
command, but this hardly feels like a stable interface.Why
dbt debug
?Why not just an interactive query (new
preview
command) with the query hard-coded toselect 1 as id
? Reasons to prefer:debug_query
debug
Questions
profiles.yml
, or could it be provided as a Python data structure?dbt_project.yml
? Just use a "dummy"/emptydbt_project.yml
?Acceptance criteria
dbt debug
, and return success/errorThe text was updated successfully, but these errors were encountered: