Open huw0 opened 1 year ago
With the new SQLAlchemy 2.0 version ImpalaDialect.get_columns
is broken, since connection.execute('plain_text')
is deprecated and should be replaced with connection.execute(text('plain_text'))
where text
is imported from sqlalchemy
, so this line would fail: https://github.com/cloudera/impyla/blob/747e1da3d0df6abae9beb633cb9ebdd6f210ad30/impala/sqlalchemy.py#L264
This is also related:
TypeError: has_table() got an unexpected keyword argument 'info_cache'
which stems from here: https://github.com/cloudera/impyla/blob/747e1da3d0df6abae9beb633cb9ebdd6f210ad30/impala/sqlalchemy.py#L231
Versions used:
Any solution on it?
With the new SQLAlchemy 2.0 version ImpalaDialect.get_columns is broken, since connection.execute('plain_text') is deprecated and should be replaced with connection.execute(text('plain_text')
This seems fixed in https://github.com/cloudera/impyla/pull/538
Additionally please include the version of SQLAlchemy in the README.
Currently SQLAlchemy related tests run with v2 for Python 3. and v1 with Python2., so to some degree both are tested.
I used SQLAlchemy only briefly, so inputs are welcome in this area, for example what to add to https://github.com/cloudera/impyla/blob/master/impala/tests/test_sqlalchemy.py to catch these issues
SQLAlchemy 2.0 was released in January and the documentation indicates a number of new functions.
Clearly not all of these are relevant in the context of Impala, but it would be good to stub these functions so that Impala can be used by SQLAlchemy applications that assume these functions are implemented.
Additionally please include the version of SQLAlchemy in the README.