mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
fix(Databricks): Escape catalog and schema names in pre-queries (#31199)
This commit is contained in:
@@ -464,8 +464,10 @@ class DatabricksNativeEngineSpec(DatabricksDynamicBaseEngineSpec):
|
||||
) -> list[str]:
|
||||
prequeries = []
|
||||
if catalog:
|
||||
catalog = f"`{catalog}`" if not catalog.startswith("`") else catalog
|
||||
prequeries.append(f"USE CATALOG {catalog}")
|
||||
if schema:
|
||||
schema = f"`{schema}`" if not schema.startswith("`") else schema
|
||||
prequeries.append(f"USE SCHEMA {schema}")
|
||||
return prequeries
|
||||
|
||||
|
||||
Reference in New Issue
Block a user