Logging query id for failures

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 ?

1 Like

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?

@u.bhatt
here is the GitHub issues which talked abt it