You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issues when using databricks-sql-connector==4.6.0 #77
I am using databricks-sqlalchemy (2.0.10) in combination with alembic (1.8.4) in a CI/CD pipeline to automate schema migrations.
When our pipeline suddenly stopped working, i found out after some debugging, that alembic fails with an error message (see below) when using databricks-sql-connector==4.6.0. After pinning the sql connector to databricks-sql-connector==4.2.6 (the version it works with from my local machine), the migrations ran through again.
The corresponding part of my CI/CD pipeline log:
File "/agent/_work/1/s/.venv/lib/python3.14/site-packages/databricks/sqlalchemy/base.py", line 382, in has_table
self._describe_table_extended(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
connection=connection,
^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
schema_name=schema,
^^^^^^^^^^^^^^^^^^^
)
^
File "/agent/_work/1/s/.venv/lib/python3.14/site-packages/databricks/sqlalchemy/base.py", line 208, in _describe_table_extended
fmt_result = _describe_table_extended_result_to_dict_list(result)
File "/agent/_work/1/s/.venv/lib/python3.14/site-packages/databricks/sqlalchemy/_parse.py", line 40, in _describe_table_extended_result_to_dict_list
for row in result.all():
~~~~~~~~~~^^
File "/agent/_work/1/s/.venv/lib/python3.14/site-packages/sqlalchemy/engine/result.py", line 987, in all
return self._allrows()
~~~~~~~~~~~~~^^
File "lib/sqlalchemy/engine/_result_cy.py", line 366, in sqlalchemy.engine._result_cy.BaseResultInternal._allrows
File "lib/sqlalchemy/engine/_result_cy.py", line 201, in sqlalchemy.engine._result_cy.BaseResultInternal._row_getter.many_rows_simple
File "lib/sqlalchemy/engine/_row_cy.py", line 72, in sqlalchemy.engine._row_cy.BaseRow.__init__
TypeError: Expected tuple, got Row
We are seeing a similar runtime failure when using databricks-sqlalchemy==2.0.10 with SQLAlchemy 2.1.x:
TypeError: Expected tuple, got Row
The failure occurs during Alembic/SQLAlchemy metadata inspection and prevents database migrations from running. It seems to be related with the SQLAlchemy versions 2.1.x, which were released recently. After pinning SQLAlchemy to the version 2.0.x, the issue disappear.
Environment
Python: 3.12.14
SQLAlchemy: 2.1.x
databricks-sqlalchemy: 2.0.10
databricks-sql-connector: 4.6.0
Alembic: 1.20.0
Request
Please fix compatibility between databricks-sqlalchemy==2.0.10 and SQLAlchemy 2.1.x, or explicitly document and enforce the supported SQLAlchemy version range. Thanks!
We are seeing a similar runtime failure when using databricks-sqlalchemy==2.0.10 with SQLAlchemy 2.1.x:
TypeError: Expected tuple, got Row
The failure occurs during Alembic/SQLAlchemy metadata inspection and prevents database migrations from running. It seems to be related with the SQLAlchemy versions 2.1.x, which were released recently. After pinning SQLAlchemy to the version 2.0.x, the issue disappear.
Environment
Python: 3.12.14
SQLAlchemy: 2.1.x
databricks-sqlalchemy: 2.0.10
databricks-sql-connector: 4.6.0
Alembic: 1.20.0
Request
Please fix compatibility between databricks-sqlalchemy==2.0.10 and SQLAlchemy 2.1.x, or explicitly document and enforce the supported SQLAlchemy version range. Thanks!
yeah, i just stumbled upon the issue with sqlalchemy 2.1.1 too. welcome to dependency hell ;)
Activity
henryhueske commentedon Sep 28, 2026
We are seeing a similar runtime failure when using
databricks-sqlalchemy==2.0.10with SQLAlchemy2.1.x:The failure occurs during Alembic/SQLAlchemy metadata inspection and prevents database migrations from running. It seems to be related with the SQLAlchemy versions 2.1.x, which were released recently. After pinning SQLAlchemy to the version 2.0.x, the issue disappear.
Environment
3.12.142.1.xdatabricks-sqlalchemy:2.0.10databricks-sql-connector:4.6.01.20.0Request
Please fix compatibility between
databricks-sqlalchemy==2.0.10and SQLAlchemy2.1.x, or explicitly document and enforce the supported SQLAlchemy version range. Thanks!brain246 commentedon Sep 30, 2026
yeah, i just stumbled upon the issue with sqlalchemy 2.1.1 too. welcome to dependency hell ;)
ovidiu-eremia commentedon Oct 12, 2026
@brain246 @henryhueske
I think you were experiencing this bug:
sqlalchemy/sqlalchemy#13634
It was fixed with SQLAlchemy 2.1.3.
It's not the fault of this Dbx dialect.