SnowPro Advanced: Architect — Question 69
A Snowflake Architect created a new data share and would like to verify that only specific records in secure views are visible within the data share by the consumers.
What is the recommended way to validate data accessibility by the consumers?
Answer options
- 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
Correct answer: C
Explanation
The correct answer is C, as setting the SIMULATED_DATA_SHARING_CONSUMER session parameter allows the architect to impersonate consumer accounts effectively, enabling validation of data access. Option A is incorrect because creating reader accounts does not directly validate data accessibility. Option B is not suitable for this scenario since it involves assigning a row access policy rather than checking visibility. Option D alters share settings but does not provide a direct method for validating data accessibility.