Skip to content

Fix: Improve Databricks Catalog setting#1240

Merged
eakmanrq merged 3 commits intomainfrom
eakmanrq/improve_databricks_set_catalog
Jul 31, 2023
Merged

Fix: Improve Databricks Catalog setting#1240
eakmanrq merged 3 commits intomainfrom
eakmanrq/improve_databricks_set_catalog

Conversation

@eakmanrq
Copy link
Contributor

I tested in Databricks running this:

%sql
USE CATALOG example;

And then

spark.read.table(table)

That table only exists in example and it worked. So you can set USE CATALOG and have it work across both SQL and Dataframe operations. The trick though is that you must be on Unity Catalog for this to work so we initially try setCurrentCatalog and then fallback to this.

@eakmanrq eakmanrq requested a review from a team July 31, 2023 19:37
@eakmanrq eakmanrq merged commit 66c610a into main Jul 31, 2023
@eakmanrq eakmanrq deleted the eakmanrq/improve_databricks_set_catalog branch July 31, 2023 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants