snowflakedb / snowflakedb/snowflake-connector-python
SNOW-228474: Support converting VARIANT to python object
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?
When querying a variant (or array and object) column the results are returned as dumped json string.
In the past before the Arrow format support we used the converter_class parameter to pass our own subclass of SnowflakeConverter that calls json.loads on the returned string.
But when using the Arrow format this parameter has no affect
What is the desired behavior?
To be able to control if the results should be a string or a python object (list or dict)
How would this improve snowflake-connector-python?
Either have a way to pass a costume converter class or have another parameter that call json.loads
I will be happy to open a pull request that adds the parameter convert_arrow_variant_to_object that if enabled, call json.loads on variant results.
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
No files, tests, or entry points are named. Start by tracing how Arrow-format VARIANT, array, and object results are converted and how converter_class is handled, then determine the configuration approach and add coverage for both string and Python object results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100