-
Notifications
You must be signed in to change notification settings - Fork 178
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
[CT-45] [Feature] Expose Snowflake query id in case of dbt test failure #82
Comments
@tommyh Thanks for opening, and for linking the prior art in dbt-labs/dbt-core#2358! I think there's some additional overlap with the proposal in #7, which would include the Snowflake query id in the result object / I'm going to transfer this issue over to the |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
@jtcohen6 thank you for your answer above. I upgraded to dbt-snowflake |
@smitthakkar1 you're right! That's because
Update: Just kidding: We already do this, in dbt-snowflake/dbt/adapters/snowflake/connections.py Lines 235 to 243 in 65e2822
|
@jtcohen6 Thanks for your reply.
Any idea on how to access those debug level logs via dbt template and print it ? |
Given this is already in the debug logs, would y'all be open to optionally appending the query ID to the error message based on some config or env var? |
Is there an existing feature request for this?
Describe the Feature
When we get a dbt test failure, I often look through the debug logs to find the exact query which was run. Having the
dbt_internal_test
query withfailures
,should_warn
, andshould_error
are an amazing first step, but the issue is that when I rerun the query, it often passes. If the debug logs (or the friendly logs) contained thesfqid
, then I could easily modify the query to use snowflake's timetravel feature, so I can recreate the failing test and debug it further.Right now, I see the following info is logged:
Related issue: dbt-labs/dbt-core#2358
Describe alternatives you've considered
Right now, I look through the snowflake query history to find the sfqid, which works but is a bit tedious.
Who will this benefit?
Analytics engineers running dbt tests being able to track down issues faster. Speed is critical because the standard edition of snowflake only allows for 1 day of timetravel, so you need to debug it quickly.
The easier it is to track down intermittent test issues the better, so that people are encouraged to write more.
Are you interested in contributing this feature?
Sure! I have a bit of experience with python (mostly ruby/javascript), but could figure it out if I know:
Anything else?
I'm loving dbt! Thanks for all of the hard work.
The text was updated successfully, but these errors were encountered: