Is this your first time submitting a feature request?
Describe the feature
As a dbt user, I want to be able to quickly look up information about the set of queries associated with a dbt model run rather than just the final create/insert/update statement. While the query_id is useful, the session_id can provided richer information back to Snowflake users to under the full lifecycle of queries executed.
To implement this feature, we could extend the SnowflakeAdapterResponse to include the session_id.
@dataclass
class SnowflakeAdapterResponse(AdapterResponse):
query_id: str = ""
session_id: str = ""
Describe alternatives you've considered
A pre_hook or post_hook that executes run_query("select current_session()") can work, but it introduces an additional DB interaction that's not necessary. It also limits applicability, since this can't be called in on-run-end (as the session will differ).
Who will this benefit?
This would help dbt-snowflake users to more effectively debug and understand why their queries succeeded or failed.
Are you interested in contributing this feature?
Yes!
Anything else?
No response