The results.json captures the query id for successful model runs for snowflake materializations. However we don’t get the query id for failures. Is it possible to get the query id for failures ; if so how can we proceed ?
May 20, 2023, 12:49pm
For failures u will not see query id in run results.json because dbt adds query id to the run_results.json only for successfully executions.
dbt logs query id in dbt.log file for failed executions.
U have to check the dbt.log file for queryid
Could link to some reference/documentation for the same?
May 22, 2023, 4:29am
here is the GitHub issues which talked abt it
11:10PM - 31 May 22 UTC
01:57AM - 29 Dec 22 UTC
### Is this your first time opening an issue?
- [X] I have read the [expectatio
… ns for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
### 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?