Skip to content

Issues when using databricks-sql-connector==4.6.0 #77

Description

@brain246

Hello there,

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

Cheers,
Thomas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions