snowflakedb / snowflakedb/snowflake-connector-python
SNOW-349018: Use @~/ as the stage, or allow the user to pass in a stage, in the write_pandas function
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 730
- Forks
- 574
- Avg merge
- 5h 45m
- Merged PRs (30d)
- 16
Description
What is the current behavior?
We generate a stage name then use create temporary stage to create it in the current schema.
What is the desired behavior?
I think users should be able to upload a file to a stage even if they don't have access to create a stage in the current schema. For example, a user could upload to their personal stage (@~/), then copy into a table they have write access to.
To enable this, we should use the @~/ as the stage instead of creating a temporary stage, and tear down any uploaded files afterwards. Or, we should at least allow the user to pass in an existing stage_name.
How would this improve snowflake-connector-python?
I think this Improves the general usability of the pandas_tools.write_pandas function.
References, Other Background
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/snowflake/connector/pandas_tools.py at the referenced lines and trace how write_pandas creates and uses its temporary stage. Compare the personal-stage and caller-supplied-stage options, including uploaded-file cleanup; done means users without permission to create a stage in the current schema can complete the upload and load flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python, sql
- Domain
- backend-api-design, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100