-
Notifications
You must be signed in to change notification settings - Fork 189
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-704] [CT-703] [Feature] Display the Query ID in the printed logs when dbt runs #165
Comments
@mpavillet Thanks for opening! I think this issue is most relevant to the As of v1.1 (#109), the "adapter response" object in structured logs and the
We also include the query ID in debug-level logs ( dbt-snowflake/dbt/adapters/snowflake/connections.py Lines 239 to 241 in c086d61
I realize that's less helpful when trying to debug queries that have succeeded, but run for longer than expected. For that, there's the
Do you feel like that gets you what you're looking for here? |
Thank you for the answer Jeremy. I am able to find the query id and used the query history table/UI for this, this feature is more to make one's life easier. |
Just wanting to chime in here as we leverage One of the challenges with the model <-> query_id relationship is that it's a one to many, ie incremental models generate multiple queries, ie a CTAS+MERGE. @jtcohen6 apologies for not searching for it, are both query_ids captured in that instance? |
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. |
Is this your first time opening an issue?
Describe the Feature
I have been hunting down some performance issues recently and was having a hard time finding the query related to my model.

It would be extremely useful to display the query_id in the printed logs:
Describe alternatives you've considered
I am using Snowflake and look for queries fired by DBT using the search history (or query history tables)
Who will this benefit?
Any dbt user who would like to get more insights into the query fired by dbt.
It depends on the database but will usually give useful information such as the explain plan.
This helps anyone who needs to investigate what's happening in the database.
Are you interested in contributing this feature?
I'd need help on where to start but happy to help!
Anything else?
https://getdbt.slack.com/archives/C2JRTGLLS/p1653515842370159
The text was updated successfully, but these errors were encountered: