-
Notifications
You must be signed in to change notification settings - Fork 151
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
SNOW-733235: Returning correct exception when table does not exist #375
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
@sfc-gh-aling : Do we consider this a behavior change? This falls into the discussion we had yesterday, where we correct a behavior. |
Has there been any update on this? It's a pretty simple fix that enables a pretty powerful feature with Great Expectations (the ability to keep validation results in Snowflake directly for analysis), so the sooner this can get approved and merged, the sooner I can move my client off of using a custom build from my personal repository for this work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, I'll let @sfc-gh-aling chime in as well.
Great, thanks @sfc-gh-sfan . It looks like a few checks failed, but I don't see how they relate directly to my changes. Can you take a look and let me know if there are changes I need to make to make the checks work? The lint failure is below: RuntimeError: The Poetry configuration is invalid: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appreciate the PR! we would love to take it, may I ask you to do us a favor to see if there're any other places where KeyError
should not be raised when checking the existence of tables (or other objects you find) and update the code accordingly. I've left comments, please let me know if you have any questions regarding my comments.
for the failure in CI, please try rebasing your branch to the latest main branch.
appreciate the quick response and data collection! |
No worries! I will be travelling for a week starting on Friday, so I'll be spotty myself, but any chance you get to give some feedback and get this resolved once and for all would be greatly appreciated! |
Did you get any chance to look into this at all? |
Co-authored-by: Adam Ling <[email protected]>
thanks @davidov541 , due to our ci limitation, I have created a draft PR for testing: https://github.com/snowflakedb/snowflake-sqlalchemy/pull/392/files once it passes, let's get your PR merged. thank you so much for the contribution and apologize for my late response! |
hey @davidov541, do you mind if I merge the identical test PR instead of this PR? (merge #392 and close this one) We have some issue with the CI setting -- for now we don't allow credential to be included in a external PR test running so CIs are expected to fail, in the meanwhile we have branch protection rule that requires the checks to pass... it's an issue we need to fix, but to unblock you, I think we can merge the identical test PR. |
I'm fine with you going with that approach if you all need it done. |
…ption.
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-733235
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
My code detects if a table does not exist in a dictionary before attempting to index into that dictionary during requests to get columns. This prevents KeyErrors from being returned, and allows us to instead return more descriptive and standard errors indicating that the table does not exist.