cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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
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
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.

Connect with Databricks Users in Your Area

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