Contoso stores data in two Unity Catalog tables: sales.core.customers, which has an email column, and sales.core.orders. A data engineer owns both tables and has SELECT on both. Neither table has a row filter or column mask yet. Three teams have requirements:
- R1 (reporting team): Query one object that combines customer and order data. The
emailvalue must be redacted unless the user is in theprivacygroup. The team must not get any privileges on either base table. The team already has USE CATALOG onsalesand USE SCHEMA onsales.core. - R2 (support team): Update rows in
orders. - R3 (compliance):
emailmust be redacted for every user outside theprivacygroup who queriescustomers. This includes thedata_engineersgroup, which has SELECT directly oncustomers.
The data engineer will create any views.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
| Statement | Yes | No |
|---|---|---|
| A single dynamic view that joins customers and orders and uses a CASE expression to redact email, with SELECT on the view granted to the reporting team, meets R1. A dynamic view can combine several tables and apply masking in one place. Users with permission on the view can query it without direct access to the base tables, because the view owner has that access. | Correct | |
| If the support team is granted SELECT on a dynamic view over orders, the team can update order rows through that view without any privileges on the orders table. Views cannot be updated. Any data modification still needs access to the base table, so the view does not meet R2. | Correct | |
| A dynamic view over customers that redacts email for users outside the privacy group meets R3. A dynamic view leaves the base table unrestricted. Members of data_engineers who are outside the privacy group would still see real email values if they queried customers directly. A column mask on customers can apply the redaction to direct queries. | Correct |
Dynamic views suit R1 because they can join several tables, apply masking in one definition, and let users query the view without privileges on the base tables, provided the view owner has access. They are read-only, so they cannot meet a requirement to update rows through the view (R2). They also leave the base table unrestricted, so a view cannot enforce masking for users who query customers directly (R3). A column mask on customers can redact email for users outside the privacy group even when they query the table directly.