cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

hive_metastore schema access control

icyapple
New Contributor

We are trying to control access to schemas under hive_metastore, only allowing certain users to access the tables under a schema (via SQL, Pyspark, and Python...), we have follow steps in a testing schema:

1. Enable workspace table access control

2. Run GRANT ALL PRIVILEGES ON SCHEMA  test to the user ID myself

3.  spark.sql("REVOKE ALL PRIVILEGES ON SCHEMA test FROM admins")

4. spark.sql("REVOKE ALL PRIVILEGES ON SCHEMA test FROM users")

But after these steps, other users still can see the tables under the test schema and run the SELECT statement for the tables under it. 

Has anyone encountered a similar issue or have suggestions on how to make it work?

Thanks in advance.

3 REPLIES 3

Witold
Honored Contributor

This is pretty outdated, you should use unity catalog instead. However, have you followed the docs? But again, it's legacy stuff.

PSR100
New Contributor III

As per my understanding, all the tables in the hive_metastore will be accessible to all the users as it will be the default metastore available for the workspace. You can move the tables to the Unity catalog tables where you will have the option to have a control over the tables with these ACL's.

Rishabh_Tiwari
Databricks Employee
Databricks Employee

Hi @icyapple ,

Thank you for reaching out to our community! We're here to help you. 

To ensure we provide you with the best support, could you please take a moment to review the response and choose the one that best answers your question? Your feedback not only helps us assist you better but also benefits other community members who may have similar questions in the future.

If you found the answer helpful, consider giving it a kudo. If the response fully addresses your question, please mark it as the accepted solution. This will help us close the thread and ensure your question is resolved.

We appreciate your participation and are here to assist you further if you need it!

Thanks,

Rishabh

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now