When accessing a view in Unity Catalog; access to underlying tables of the view is also needed.

KevSpally
New Contributor II

My goal is that i want to provide users access to a view but not the underlying tables. I only want them to see specific columns and rows of the table. When i just give the select permissions on the view the user gets an error that they also need access to the underlying tables. When i give select permissions on the underlying table they are able to select data from the view.

Is there a way to give the users only access to the view and not the underlying tables or am i doing something wrong here.

Any help is much appreciated!

jonathan_ruiz
New Contributor II

I have exactly the same question, did anyone get the right answer?

dtb_usr
New Contributor III

I am having the same issue. I am having to pass ownership of pipelines to users for them to read materialised views associated with any pipeline otherwise they get a 'User does not have SELECT on table...' error. This is obviously bonkers as any pipeline can only have one owner and you cant give ownership to groups. 

This is a new error by the way as the same pipelines/materialised views were accessible by the same users/clusters a month ago. So something has changed recently in Databricks to break this. 

Shaymi15
Databricks Partner

@KevSpally  Basically, you can either enforce access using column masking and row filtering, or solve it by exposing a materialized view.

hongtin
New Contributor II

you may need to check if the compute you are using met what mentioned in https://docs.databricks.com/aws/en/views/#requirements-for-querying-views