ARRAY column not supported on HybridTable despite Snowflake documentation claiming otherwise #570
Labels
bug
Something isn't working
status-fixed_awaiting_release
The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.
status-triage_done
Initial triage done, will be further handled by the driver team
Please answer these questions before submitting your issue. Thanks!
What version of Python are you using?
Python 3.12.8 (main, Dec 4 2024, 08:54:12) [GCC 11.4.0]
What operating system and processor architecture are you using?
Linux-6.8.0-51-generic-x86_64-with-glibc2.35
What are the component versions in the environment (
pip freeze
)?alembic==1.14.0
asn1crypto==1.5.1
certifi==2024.12.14
cffi==1.17.1
charset-normalizer==3.4.1
cryptography==44.0.0
dependency-injector==4.45.0
et_xmlfile==2.0.0
filelock==3.16.1
greenlet==3.1.1
idna==3.10
iniconfig==2.0.0
Mako==1.3.8
MarkupSafe==3.0.2
numpy==2.2.1
openpyxl==3.1.5
packaging==24.2
pandas==2.2.3
pandas-stubs==2.2.3.241126
platformdirs==4.3.6
pluggy==1.5.0
pycparser==2.22
PyJWT==2.10.1
pyOpenSSL==24.3.0
pytest==8.3.4
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
pytz==2024.2
requests==2.32.3
ruff==0.8.6
six==1.17.0
snowflake-connector-python==3.12.4
snowflake-sqlalchemy==1.7.2
sortedcontainers==2.4.0
SQLAlchemy==2.0.37
tomlkit==0.13.2
types-pytz==2024.2.0.20241221
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.3.0
What did you do?
I tried to add a structured data type column to a hybrid table (in my case an array column), but
snowflake-sqlalchemy
throws an error stating this is only supported on Iceberg Tables. However, the Snowflake documentation states the following (see subsection: Data types not supported in indexes):What did you expect to see?
Since I ran the above code (except the last line) with alembic, I expected alembic to generate a migration script that would add the array column
to the table named
my_table
. In turn I expect the migration script runs successfully.What should have happened and what happened instead?
While atempting to generate the alembic migration, the following error is thrown instead:
I suspect this happens because
HybridTable
inherits fromCustomTableBase
which by default sets_support_structured_types = False
, andHybridTable
does not override this class variable, whereasIcebergTable
does perform the following override_support_structured_types = True
.I Just tested the above hypothesis, and can confirm everything works flawlessly when
_support_structured_types = True
is added to theHybridTable
class. Both the migration gets generated successfully, and the migration runs successfully...Can you set logging to DEBUG and collect the logs?
The text was updated successfully, but these errors were encountered: