snowflake-connector-python
snowflake-connector-python copied to clipboard
feat: allow snowflake cursor on write_pandas.
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 #1957
-
Fill out the following pre-review checklist:
- [x] I am adding a new automated test(s) to verify correctness of my new code
- [ ] I am adding new logging messages
- [ ] I am adding a new telemetry message
- [ ] I am modifying authorization mechanisms
- [ ] I am adding new credentials
- [ ] I am modifying OCSP code
- [ ] I am adding a new dependency
-
Please describe how your code solves the related issue.
The write_pandas process can be described more intuitively while dealing with cursors using with.
with snowflake_conn.cursor() as cursor:
df = cursor.execute("...").fetch_pandas_all()
write_pandas(cursor, df)
All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.
I have read the CLA Document and I hereby sign the CLA