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

Expose Snowflake query id in case of an exception raised by connector #2358

Conversation

ChristianKohlberg
Copy link
Contributor

@ChristianKohlberg ChristianKohlberg commented Apr 26, 2020

resolves #2201

Description

This PR accomplishes:

  • Faster access to the query id when debugging
  • Allows to search for the query id inside the Snowflake query history
  • Allows for better communication with snowflake support through query ids

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

…ctor

* Allows to search for the query id inside the Snowflake query history
* Allows for better communication with snowflake support through query ids
@cla-bot
Copy link

cla-bot bot commented Apr 26, 2020

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, don't hesitate to ping @drewbanin.

CLA has not been signed by users: @ChristianKohlberg

@ChristianKohlberg ChristianKohlberg marked this pull request as ready for review April 26, 2020 11:34
@beckjake
Copy link
Contributor

@cla-bot check

@cla-bot cla-bot bot added the cla:yes label Apr 27, 2020
@cla-bot
Copy link

cla-bot bot commented Apr 27, 2020

The cla-bot has been summoned, and re-checked this pull request!

@beckjake beckjake self-requested a review April 27, 2020 13:04
Copy link
Contributor

@beckjake beckjake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChristianKohlberg Thanks for your contribution, this looks great to me!

A quick question about snowflake - should we add special handling to the except Exception as e block that checks if it's a snowflake.connector.errors.Error and logs sfqid there, too? There are other kinds of snowflake errors, they apparently all have an sfqid attribute that can be None.

Copy link
Contributor

@beckjake beckjake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add yourself to the contributors list in the CHANGELOG, so we can make sure we give you credit in the release notes!

CHANGELOG.md Outdated Show resolved Hide resolved
@drewbanin
Copy link
Contributor

hey @ChristianKohlberg are you able to make the changes Jake requested? We'd love to ship this in the next dbt release if we can, so it would be great to get this PR merged by the end of the week :)

@ChristianKohlberg
Copy link
Contributor Author

Sorry for the low responsiveness. Will finish it up tonight and include the feedback from Jake. Many thanks for the patience in the meantime!

@ChristianKohlberg
Copy link
Contributor Author

@beckjake hope that this is now solved as anticipated. Once again sorry for the delay!

@beckjake beckjake merged commit f4c6bf3 into dbt-labs:dev/octavius-catto May 21, 2020
@beckjake
Copy link
Contributor

Thanks for your contribution @ChristianKohlberg! We'll squeeze this into 0.17.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose sfqid attribute in snowflake exception messages
3 participants