From 2d0eb38c3ba63a25979ae561284c6d528007192b Mon Sep 17 00:00:00 2001 From: Beto Dealmeida Date: Fri, 26 Apr 2024 07:49:20 -0400 Subject: [PATCH] fix: Dremio alias (#28222) (cherry picked from commit 173d5d09bf9a7f5e1875c6eadc409edc27c1eef7) --- superset/db_engine_specs/__init__.py | 2 +- superset/db_engine_specs/dremio.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/superset/db_engine_specs/__init__.py b/superset/db_engine_specs/__init__.py index 9ec0f0416bd09..e8b2ae550a611 100644 --- a/superset/db_engine_specs/__init__.py +++ b/superset/db_engine_specs/__init__.py @@ -153,7 +153,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) else: backend = dialect.name if isinstance(backend, bytes): diff --git a/superset/db_engine_specs/dremio.py b/superset/db_engine_specs/dremio.py index 746576d3f30da..32ffee81a6c5c 100644 --- a/superset/db_engine_specs/dremio.py +++ b/superset/db_engine_specs/dremio.py @@ -37,6 +37,13 @@ class DremioEngineSpec(BaseEngineSpec): engine = "dremio" engine_name = "Dremio" + engine_aliases = {"dremio+flight"} + sqlalchemy_uri_placeholder = ( + "dremio+flight://data.dremio.cloud:443/?" + "Token=&" + "UseEncryption=true&" + "disableCertificateVerification=true" + ) _time_grain_expressions = { None: "{col}",