
Explanation:
When a user who is not in the specified group (in this case, sales) queries a dynamic view, the CASE expression evaluates based on the result of is_member().
CREATE VIEW statement explicitly selects only two columns: the result of the CASE expression (aliased as email) and the ltv column. Therefore, the age column is not included in the output.is_member('sales') returns FALSE. The ELSE branch of the CASE statement is triggered, returning the literal string 'REDACTED' for every row in the email column.email and ltv), with the email values replaced by the mask string. This follows standard Databricks security patterns for row- and column-level redaction using dynamic views.Ultimate access to all questions.
No comments yet.
A data analyst who is not a member of the sales group queries a view named email_lifetimevalue. This view is built upon the user_lifetimevalue table, which contains the following schema:
email: STRINGage: INTltv: INTThe view was created using the following SQL statement:
CREATE VIEW email_lifetimevalue AS
SELECT
CASE WHEN is_member('sales') THEN email ELSE 'REDACTED' END AS email,
ltv
FROM user_lifetimevalue
CREATE VIEW email_lifetimevalue AS
SELECT
CASE WHEN is_member('sales') THEN email ELSE 'REDACTED' END AS email,
ltv
FROM user_lifetimevalue
What will the analyst see when they execute the query SELECT * FROM email_lifetimevalue?
A
The query will return all three columns (email, age, and ltv) with the original, unmasked values from the source table.
B
The query will return only the email and ltv columns. The email column will contain NULL values for all rows.
C
The query will return only the email and ltv columns. The email column will contain the string "REDACTED" for all rows.
D
Three columns will be returned, but one column will be renamed "REDACTED" and contain only NULL values.
E
The query will return the email, age, and ltv columns with the values as they appear in the user_lifetimevalue table.