Snowflake share masking at consumer end

Viewed 19

We have created the share from production to staging env. We have 2 different snowflake accounts one is for production and one is for staging.

We want to mask the data on staging env and the data is in share.

Is it possible to mask data on staging env (share at consumer level) directly instead of masking the data on production and then sharing it with staging.

I want to create masking policies only on staging snowflake.

1 Answers
  1. You can't share a table/secure view if it has masking policies attached to it
  2. A Database created in the consumer account from a share is read-only - so you can't add masking policies to it

In the consumer account, you would need to:

  1. not give access to the shared database to users
  2. Create a second database that contained views onto the tables/views in the shared database
  3. Assign masking policies to the columns in this second database
  4. Give your users access to this second database
Related