From 565c59d2fbb7c4dc338ace264be07bb0cf65419c Mon Sep 17 00:00:00 2001 From: Beto Dealmeida Date: Fri, 11 Feb 2022 11:00:55 -0800 Subject: [PATCH] fix: unambiguous trino driver --- setup.py | 5 ++++- superset/db_engine_specs/trino.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ba0f5bad90b4d..9899daf4009fa 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,10 @@ def get_git_sha() -> str: packages=find_packages(), include_package_data=True, zip_safe=False, - entry_points={"console_scripts": ["superset=superset.cli.main:superset"]}, + entry_points={ + "console_scripts": ["superset=superset.cli.main:superset"], + "sqlalchemy.dialects": ["trinonative = sqlalchemy_trino.dialect:TrinoDialect"], + }, install_requires=[ "backoff>=1.8.0", "bleach>=3.0.2, <4.0.0", diff --git a/superset/db_engine_specs/trino.py b/superset/db_engine_specs/trino.py index 778845d132e95..4e5f153ad2ab2 100644 --- a/superset/db_engine_specs/trino.py +++ b/superset/db_engine_specs/trino.py @@ -34,6 +34,7 @@ class TrinoEngineSpec(BaseEngineSpec): engine = "trino" + engine_aliases = {"trinonative"} engine_name = "Trino" _time_grain_expressions = {