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 摘要。