Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the query id #530

Closed
WarFox opened this issue Dec 4, 2023 · 2 comments · Fixed by #534
Closed

Log the query id #530

WarFox opened this issue Dec 4, 2023 · 2 comments · Fixed by #534
Labels
good_first_issue Good for newcomers type:enhancement New feature or request

Comments

@WarFox
Copy link
Contributor

WarFox commented Dec 4, 2023

Hello!

Thank you for making this adapter for Athena, we depend on this heavily.

Not sure if this has already been discussed/considered. In order to help with any issues related to a particular query, it would be great if Athena Query ID get logged at some point.

I see the sql is getting logged on exception, which is great.
https://github.com/dbt-athena/dbt-athena/blob/main/dbt/adapters/athena/connections.py#L216

Since Athena provides a unique query id for each query it would be helpful to log it

  • on start query execution
  • on query completion
  • in case of exception

Issue triaging would be much smoother with this

@nicor88 nicor88 added good_first_issue Good for newcomers type:enhancement New feature or request labels Dec 4, 2023
@nicor88
Copy link
Contributor

nicor88 commented Dec 6, 2023

@WarFox good suggestion, are you willing to contribute and propose the required changes?

@WarFox
Copy link
Contributor Author

WarFox commented Dec 6, 2023

@nicor88 sure I can pick this up over the weekend

WarFox added a commit to WarFox/dbt-athena that referenced this issue Dec 9, 2023
- Adds info log as soon as query id is available
- Adds query_id to warning and debug logs in AthenaCursor
WarFox added a commit to WarFox/dbt-athena that referenced this issue Dec 9, 2023
- Adds info log as soon as query id is available
- Adds query_id to warning and debug logs in AthenaCursor
WarFox added a commit to WarFox/dbt-athena that referenced this issue Dec 10, 2023
- Log the query id as soon as it is available
- Adds query_id to warning and debug logs in AthenaCursor
nicor88 added a commit that referenced this issue Dec 11, 2023
Co-authored-by: nicor88 <6278547+nicor88@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good_first_issue Good for newcomers type:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants