mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
feat(presto): get_catalog_names (#23599)
This commit is contained in:
@@ -785,6 +785,17 @@ class PrestoEngineSpec(PrestoBaseEngineSpec):
|
||||
results = cursor.fetchall()
|
||||
return {row[0] for row in results}
|
||||
|
||||
@classmethod
|
||||
def get_catalog_names(
|
||||
cls,
|
||||
database: Database,
|
||||
inspector: Inspector,
|
||||
) -> List[str]:
|
||||
"""
|
||||
Get all catalogs.
|
||||
"""
|
||||
return [catalog for (catalog,) in inspector.bind.execute("SHOW CATALOGS")]
|
||||
|
||||
@classmethod
|
||||
def _create_column_info(
|
||||
cls, name: str, data_type: types.TypeEngine
|
||||
|
||||
Reference in New Issue
Block a user