-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SNOW-801402: Writing dictionary as variant using sqlalchemy orm #411
Comments
same issue with array, object types as well. looks like an old one and no one at Snowflake cares enough to fix this. |
Bump. I was about to create almost identical issue. There is some workaround from the issue #299 mentioned already and Snowflake Knowledge Base. Maybe we can expect proper support when |
hi and thank you for submitting this issue and for all your patience here. Tried to make this work but it does not seem to be a way to pass the dict as a For now, the workarounds already mentioned can be used (e.g. create the table then populate it with the VARIANT data afterwards as described in above KB article) |
Bumping this. It's been year since #299 was logged and we still can't do basic things with arrays. Sad to see the level of neglect on this repo. |
short update: team is planning a private preview of the upcoming version 2.0 to be available this month, which will contain fix for this issue as well. I'll keep this thread posted. |
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using?
3.9
What operating system and processor architecture are you using?
macOS-13.3.1-arm64-arm-64bit
What are the component versions in the environment (
pip freeze
)?Replace with the output of
python -m pip freeze
What did you do?
When I run
sess.commit()
I get an errorI also tried with
my_item = MyTable(json_data=json.dumps(my_dict))
, then I get a different errorI also tried converting the dictionary to a string and wrapping it with "PARSE_JSON()".
None of it worked.
What did you expect to see?
I expect to be able to run
And the dictionary to be written to snowflake as a json object with VARIANT type.
Is there any way to do that?
The text was updated successfully, but these errors were encountered: