aws / aws/amazon-redshift-python-driver

Getting the query id from the cursor

未关闭
#268 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
220
派生
86
PR 合并指标
30 天内没有已合并 PR

描述

Hi - would it be possible to get the query id from the cursor instead of needing to run a separate query? Right now we have to make a separate call when we want to cancel the running query [like this](https://github.com/dbt-labs/dbt-adapters/blob/300ee9278b2568173c0c465399a69696cc085982/dbt-redshift/src/dbt/adapters/redshift/connections.py#L459) and would also like to easily log query ids in our application logs for customer debugging.

This is something that we get [from snowflake](https://github.com/dbt-labs/dbt-adapters/blob/b5d3fbf8b704e393d07b8f37371a9ebc7eb33e44/dbt-snowflake/src/dbt/adapters/snowflake/record/cursor/cursor.py#L19) but doesn't look like I can get it from the cursor here.

贡献指南

打开贡献指南

调研方向

比较 dbt-redshift connections.py 中 Redshift 连接的使用方式与 dbt-snowflake cursor.py 中所引用的游标实现。跟踪 Redshift 游标的创建方式,以及查询执行在哪些位置暴露元数据;完成的标准是调用方无需执行单独的查询,即可从游标获取 query id,用于取消操作和应用程序日志记录。

由索引模型根据 Issue 内容生成。

评估

技术栈
aws, python
领域
databases
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。