-
Notifications
You must be signed in to change notification settings - Fork 487
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-534004: Added database and schema to the queries related to temporary stage #1274
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
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.
Would you please add an integration test in test/integ/pandas/test_pandas_tool.py
to verify your change 🙂 ?
In order to use the pytest fixtures we have (e.g. conn_cnx
, db_parameters
), you need to add a file named parameters.py
under test/
, which contains the parameters you pass to snowflake.connector.Connect
like:
#!/usr/bin/env python
CONNECTION_PARAMETERS = {
'account': 'accountname',
'user': 'username',
'password': 'password',
'schema': 'schemaname',
'database': 'databasename',
'protocol': 'https',
'host': 'hostname',
'port': 'portnumber',
}
Hi @jekaterinakletnaja , thank you for looking into the issue and submitting a fix, we really appreciate your contribution 🎉 ! Please address my comments, I will keep monitoring this PR, let's try to merge this change soon. |
…ng format() to f-strings where backslashes are not used; adding tests
Hi @sfc-gh-stan, appreciate your comments and suggestions! I reflected those in the latest commit and added tests. At the same time, while adding tests and running previous ones related to
Indeed, in case a
UPD: I’ve got what was the problem in p.2, my bad. It is solved now by the latest commit. Question in p.1 is still actual though. |
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.
Thank you for addressing my suggestions, the code change looks good to go!
I made a few more comments about the tests, mainly concerned with code duplication/simplicity. Please let me know what you think 🙂 .
|
Hey @sfc-gh-stan, I like your idea for tests combo! Please let me know whether latest changes cover it in full. |
Hi @jekaterinakletnaja , your code LGTM and has passed all the merge gates 🎉 ! Normally this would be merged right away, but since the bug fix is technically a behavior change, it can only be merged into to |
Hi @sfc-gh-stan, thanks for the wonderful news! 🎉 Looking forward to January 2023! |
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-534004: write_pandas does not use schema provided #1034
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Database and schema parameters are not used in the
write_pandas
code that is related to temporary stage - it refers only to the stage’s name. Therefore, in case the connection provided towrite_pandas
has no database and/or schema, execution fails, even if database and/or schema are provided as arguments to thewrite_pandas
itself. Thus, indication of database and schema in the queries related to the temporary stage solves the issue.