-
Notifications
You must be signed in to change notification settings - Fork 473
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-834366 Fall back to use current schema for temp objects in write… #1617
Conversation
…_pandas Description In 3.0.0 we made a change to use target schema for temp stage and file format, but this breaks user when they only have stage/file format creation privilege in current schema, but not the target schema. This change adds a fallback mechanism to use current schema if creating temp object fails on target schema. Testing integ test
_do_create_temp_stage( | ||
cursor, stage_location, compression, auto_create_table, overwrite | ||
) |
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.
why are we creating temp stage again if we encountered an exception?
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.
ohh, I see. This will use current_schema
instead of temp schema
Would this change also need to go in sproc-connector as the issue which caused this came from stored procs? |
Yes. I'm working on the sp connector changes :) |
Codecov Report
@@ Coverage Diff @@
## main #1617 +/- ##
==========================================
+ Coverage 82.66% 82.71% +0.05%
==========================================
Files 64 64
Lines 8992 9013 +21
Branches 1331 1331
==========================================
+ Hits 7433 7455 +22
+ Misses 1220 1219 -1
Partials 339 339
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…_pandas
Description
In 3.0.0 we made a change to use target schema for temp stage and file format, but this breaks user when they only have stage/file format creation privilege in current schema, but not the target schema.
This change adds a fallback mechanism to use current schema if creating temp object fails on target schema.
Testing
integ test
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-834366
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.