Which statement is true regarding a row access policy on a materialized view, given no policy on the underlying table?

Master the SnowPro Advanced Architect Test with flashcards, multiple-choice questions, and detailed explanations. Prepare thoroughly for your certification!

Multiple Choice

Which statement is true regarding a row access policy on a materialized view, given no policy on the underlying table?

Explanation:
Row-level access filtering can be applied to a materialized view, but Snowflake requires that there be no row access policy defined on the underlying source object (the base table or view) before you add one to the materialized view. This keeps the visibility rules predictable rather than stacking or conflicting filters from multiple policies. If the underlying table has no policy, you can attach a row access policy to the materialized view and that policy will govern which rows are returned when querying the MV. So, in a situation with no policy on the base table, adding a policy to the materialized view is allowed and makes the MV enforce the desired row-level access. The other statements don’t align with this behavior: you don’t need a policy on the base object to add one to the MV, there are constraints to consider, and it is indeed possible to apply a row access policy to a materialized view.

Row-level access filtering can be applied to a materialized view, but Snowflake requires that there be no row access policy defined on the underlying source object (the base table or view) before you add one to the materialized view. This keeps the visibility rules predictable rather than stacking or conflicting filters from multiple policies. If the underlying table has no policy, you can attach a row access policy to the materialized view and that policy will govern which rows are returned when querying the MV. So, in a situation with no policy on the base table, adding a policy to the materialized view is allowed and makes the MV enforce the desired row-level access. The other statements don’t align with this behavior: you don’t need a policy on the base object to add one to the MV, there are constraints to consider, and it is indeed possible to apply a row access policy to a materialized view.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy