-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pyspark): try
USE [CATALOG|DATABASE]
before pyspark api
The unity catalog on Databricks has weird permissioning where it doesn't allow (at least one) user to run `setCurrentCatalog` or `setCurrentDatabase`. It _does_ allow setting those via `USE CATALOG mycat;` and `USE DATABASE mydb;`. This, however, is not part of standard Spark SQL and is special Databricks Spark SQL. SO, we try the special databricks SQL, if that throws a parser error, we fall back to using the pyspark API methods.
- Loading branch information
Showing
2 changed files
with
63 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters