Skip to content

Commit 85b4403

Browse files
authored
fix: databricks catalog with session support (#2464)
1 parent a8a36c4 commit 85b4403

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sqlmesh/core/engine_adapter/databricks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def get_current_catalog(self) -> t.Optional[str]:
144144

145145
try:
146146
# Note: Spark 3.4+ Only API
147-
return super().get_current_catalog()
147+
return self.spark.catalog.currentCatalog()
148148
except (Py4JError, SparkConnectGrpcException):
149149
pass
150150
result = self.fetchone(exp.select(self.CURRENT_CATALOG_EXPRESSION))
@@ -164,7 +164,7 @@ def set_current_catalog(self, catalog_name: str) -> None:
164164

165165
try:
166166
# Note: Spark 3.4+ Only API
167-
super().set_current_catalog(catalog_name)
167+
self.spark.catalog.setCurrentCatalog(catalog_name)
168168
except (Py4JError, SparkConnectGrpcException):
169169
pass
170170

0 commit comments

Comments
 (0)