mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Be able to lookup driver by engine alias (#16800)
This commit is contained in:
parent
c933250dad
commit
0d064f4451
@ -147,6 +147,15 @@ def get_available_engine_specs() -> Dict[Type[BaseEngineSpec], Set[str]]:
|
||||
|
||||
available_engines = {}
|
||||
for engine_spec in load_engine_specs():
|
||||
available_engines[engine_spec] = drivers[engine_spec.engine]
|
||||
driver = drivers[engine_spec.engine]
|
||||
|
||||
# lookup driver by engine aliases.
|
||||
if not driver and engine_spec.engine_aliases:
|
||||
for alias in engine_spec.engine_aliases:
|
||||
driver = drivers[alias]
|
||||
if driver:
|
||||
break
|
||||
|
||||
available_engines[engine_spec] = driver
|
||||
|
||||
return available_engines
|
||||
|
Loading…
Reference in New Issue
Block a user