You have Parquet files containing customer order data in an external stage. You need to create a secure view in Snowflake that filters the data based on user roles. Only users with the 'SALES REP' role should see orders from their assigned region, while 'MANAGER' roles should see all data'. Assuming you have set up appropriate role hierarchies, how would you implement this using row-level security policies with Parquet external tables?
Correct Answer: D
Row Access Policies (RAP) are designed for Row Level Security, and they are applied to tables or views. Since the data is in an external table accessed through a view, the policy should be attached to the secure view. The ' function is used to determine the user's current role within the policy's logic. Secure Views protect the underlying data and policy logic from unauthorized access. Delegating ownership to 'ACCOUNTADMIW is not strictly required but a good security practice. Masking policies aren't the correct choice here as it is used to hide data from the user.