- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 06:00 PM
In my workspace, I'm able to see the unity catalogs my team has created. I'm able to see the schemas and even query data in there and create views using the SQL Editor.
When I go to write the same sql queries from a notebook using spark.sql or %sql I get this error:
AnalysisException: [UC_NOT_ENABLED] Unity Catalog is not enabled on this cluster.
I reviewed my cluster and it is a:
- Databricks ML 13.0 Runtime
- Access Mode is Single User
- Personal Compute Policy
I'm unsure why this is the case, especially if I can access it normally outside of the notebook. Does anyone have ways to fix this?
- Labels:
-
Catalog
-
DAIS2023
-
SQL Editor
-
Unity Catalog
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 09:04 AM
Figured it out. Had to just delete my personal cluster (which was created before the unity metastore was set up) and recreate it. Then if you run "USE CATALOG my_catalog;" before your queries in your notebook, it works great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 09:04 AM
Figured it out. Had to just delete my personal cluster (which was created before the unity metastore was set up) and recreate it. Then if you run "USE CATALOG my_catalog;" before your queries in your notebook, it works great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2023 04:09 AM
had a similar issue earlier.. thanks for the solution..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2023 09:05 AM
Hi @Ani Madurkar ,
It's required that the cluster you are using should have unity catalog enabled then you will be able to query your catalog.
#DAIS2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2023 06:29 AM
You need to make sure that in the cluster you are using you have the Unity Catalog tag. Then in the notebook add the use catalog ..... after this you will be able to query your table if you have the permission.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2023 03:03 AM
Hi @Ani Madurkar
Thank you for posting your question in our community! We are happy to assist you.
To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?
This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 07:24 AM
Thanks! just did
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
i know this is an old topic, but i have the same issue with querying data using the sql editor and a sql warehouse. my sql warehouse does have unity catalog enabled. not sure why it wouldnt be working.