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: 

Error - Data Masking

FaizH
New Contributor III

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 table
CREATE 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.


FaizH_0-1721187898699.png

 



1 ACCEPTED SOLUTION

Accepted Solutions

szymon_dybczak
Esteemed Contributor III

Hi @FaizH , 

Are you using single user compute by any chance? 

Because of you do there is following limitation:

Single-user compute limitation

Do not add row filters or column masks to any table that you are accessing from a single-user cluster. During the public preview, you will be unable to access tables from a single user cluster if a filter or mask has been applied.

View solution in original post

2 REPLIES 2

szymon_dybczak
Esteemed Contributor III

Hi @FaizH , 

Are you using single user compute by any chance? 

Because of you do there is following limitation:

Single-user compute limitation

Do not add row filters or column masks to any table that you are accessing from a single-user cluster. During the public preview, you will be unable to access tables from a single user cluster if a filter or mask has been applied.

FaizH
New Contributor III

Thanks for your reply. I use Access Mode as Shared instead of Single User for a cluster and it worked.

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