-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Dremio alias #28222
fix: Dremio alias #28222
Conversation
@@ -154,7 +154,7 @@ def get_available_engine_specs() -> dict[type[BaseEngineSpec], set[str]]: | |||
try: | |||
dialect = ep.load() | |||
except Exception as ex: # pylint: disable=broad-except | |||
logger.warning("Unable to load SQLAlchemy dialect %s: %s", dialect, ex) | |||
logger.warning("Unable to load SQLAlchemy dialect %s: %s", ep.name, ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When ep.load()
failed on line 155 this would show the name of the previous dialect successfully loaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this has been working correctly for other drivers, wouldn't this indicate that the problem is in the Dremio driver? I'm assuming we've never had trouble with postgresql+psycopg2
, despite not aliasing for it..?
@villebro yeah, the problem is in the driver. I took a look at their repo and couldn't see anything wrong, but I'm going to file a ticket about it. Here's the odd behavior: >>> from sqlalchemy import create_engine
>>> engine = create_engine("dremio+flight://beto:XXX@localhost:32010/dremio")
>>> engine.dialect.name
'dremio+flight'
>>> engine.dialect.driver
'dremio+flight' On the other hand: >>> engine = create_engine("shillelagh+apsw://")
>>> engine.dialect.name
'shillelagh'
>>> engine.dialect.driver
'apsw' |
(cherry picked from commit 173d5d0)
(cherry picked from commit 173d5d0)
SUMMARY
For some reason the 3.x version of the Dremio driver shows the dialect as
dremio+flight
, instead of simplydremio
with the driverflight
.This PR adds
dremio+flight
to the list of aliases in the Dremio DB engine spec, so that Dremio shows up in the database dropdown correctly.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
Tested locally, connected to Dremio:
ADDITIONAL INFORMATION