Skip to content

Array results should be returned as Python lists #114

@csdev

Description

@csdev

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using (python --version)?
Python 2.7.12
  1. What operating system and processor architecture are you using (python -c 'import platform; print(platform.platform())')?
Linux-5.0.0-25-generic-x86_64-with-Ubuntu-16.04-xenial
  1. What are the component versions in the environment (pip list)?
snowflake-connector-python (1.8.2)
snowflake-sqlalchemy (1.1.13)
SQLAlchemy (1.3.6)
  1. What did you do?
  2. What did you expect to see?
  3. What did you see instead?

We are trying to run some queries that return arrays. We expect to get the results back as a Python list, but instead we get the database's raw string response. For example, SELECT TO_ARRAY(1) should return [1]. However, we are actually receiving the following:

"[
  "1"
]"

Here is a basic program that reproduces the problem:
https://gist.github.com/csdev/4d7078af2b0ab927865a0c0a71f535ad

  1. Can you set logging to DEBUG and collect the logs?
    https://gist.github.com/csdev/7c1fd49083e239f97c9b4dc5263d97b5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions