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:
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?
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.
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.
06-02-2023 04:09 AM
had a similar issue earlier.. thanks for the solution..
05-31-2023 09:05 AM
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.
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!
06-08-2023 07:24 AM
Thanks! just did
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group