-
Notifications
You must be signed in to change notification settings - Fork 552
Open
Description
SQLAlchemy 2.0.0 has been released on the 26th of January 2023, and it's incompatible with PyHive for connections to Presto, Trino and Hive:
from sqlalchemy import create_engine
create_engine('presto://foo:bar@host')
# results in
File "/some/path/pyhive/sqlalchemy_presto.py", line 16, in <module>
from sqlalchemy.databases import mysql
ModuleNotFoundError: No module named 'sqlalchemy.databases'
Similarly,
from sqlalchemy import create_engine
create_engine('trino://foo:bar@host')
# results in
File "/some/path/sqlalchemy/util/langhelpers.py", line 366, in load
"Can't load plugin: %s:%s" % (self.group, name)
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:trino
and
from sqlalchemy import create_engine
create_engine('hive://foo:bar@host')
# results in
File "/some/path/pyhive/sqlalchemy_hive.py", line 16, in <module>
from sqlalchemy import processors
ImportError: cannot import name 'processors' from 'sqlalchemy' (/some/path/sqlalchemy/__init__.py)
Pinning SQLAlchemy<2.0.0
resolves the issue.
casidiablo, jeffersd, kalinote and leahganis
Metadata
Metadata
Assignees
Labels
No labels