dbt-labs / dbt-labs/dbt-adapters
[Feature] Provide `query_id` in the Adapter Response
- Dominant language
- Python
- Stars
- 233
- Forks
- 362
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 9
Description
### Is this your first time submitting a feature request?
- [X] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
- [X] I have searched the existing issues, and I could not find an existing issue for this feature
- [X] I am requesting a straightforward extension of existing dbt-redshift functionality, rather than a Big Idea better suited to a discussion
### Describe the feature
I want to be able to capture the query ID of the statement used to load a model.
This will be helpful if we ever need to troubleshoot or diagnose a particular model load by taking the query ID and cross-referencing it in the various system tables that give stats & metrics for every query that is run.
### Describe alternatives you've considered
I am unsure of an alternative for how to capture the exact query ID that was run for a model besides capturing it in the adapter and providing it in the Adapter Response, which will then save it to the JSON artifacts.
### Who will this benefit?
This will be helpful for database administrators, data engineers, and data analysts in needing to troubleshoot or diagnose performance issues with a particular dbt build.
### Are you interested in contributing this feature?
Yes
### Anything else?
Reference to the `dbt-snowflake` adapter where they are capturing `query_id` in the adapter response: https://github.com/dbt-labs/dbt-snowflake/blob/f95b9192f6eec9af4e30eaab87f9e3412febf7d1/dbt/adapters/snowflake/connections.py#L456-L461
Contributor guide
Assessment
This issue has not been assessed yet.