A Snowflake Architect has created a new data share and wants to confirm that consumers can see only specified records in secure views within the data share.
What is the recommended method for validating data accessibility for the consumers?
A Create reader accounts as shown below and impersonate the consumers by logging in with their credentials.create managed account reader_acct1 admin_name = user1 , admin_password = 'Sdfed43da!44' , type = reader; B Create a row access policy as shown below and assign it to the data share.create or replace row access policy rap_acct as (acct_id varchar) returns boolean -> case when 'acct1_role' = current_role() then true else false end; C Set the session parameter called SIMULATED_DATA_SHARING_CONSUMER as shown below in order to impersonate the consumer accounts.alter session set simulated_data_sharing_consumer = 'Consumer Acct1' D Alter the share settings as shown below, in order to impersonate a specific consumer account.alter share sales_share set accounts = 'Consumer1' share_restrictions = true Show Answer Answer Explanation Snowflake’s SIMULATED_DATA_SHARING_CONSUMER session parameter simulates a specified consumer account when querying secure views. This allows the provider to verify that each consumer account sees only the intended records.
Learn more
Community Discussion