Hi,
I was testing masking functionality of databricks and got the below error:
java.util.concurrent.ExecutionException: com.databricks.sql.managedcatalog.acl.UnauthorizedAccessException:
PERMISSION_DENIED: Query on table dev_retransform.uc_lineage.test_users_1
with row filter or column mask requires the SINGLE USER ACCESS privilege to be accessible from assigned clusters.
Below are the steps I followed in the notebook:
1. First I created this function
CREATE or REPLACE FUNCTION price_mask(price STRING)
RETURN CASE WHEN is_member('HumanResourceDept') THEN price ELSE '***-**-****' END;
2. I created this tableCREATE TABLE test_users_1 (
name STRING,
price FLOAT MASK price_mask);
3. Before inserting any data, I executed this query select * from dev_retransform.uc_lineage.test_users_1, and got the error highlighted in the screenshot below.
Where I need to give access? When I create a table without this function, I don't get any error.