
Answer-first summary for fast verification
Answer: CASE WHEN is_member(‘auditor’) and NOT is_member(‘compliance’) THEN price ELSE 0 END AS price,
This question evaluates your understanding of column-level permissions in dynamic views within Databricks. The correct approach involves using the `is_member()` function to check group membership. The valid syntax is `is_member(‘auditor’) and NOT is_member(‘compliance’)`, which correctly restricts the `price` column visibility based on the specified group memberships. Note that `is_member()` is now considered legacy, with `is_account_group_member()` being the recommended function for future use. However, `is_member()` may still appear in exams due to recent updates by Databricks. For more details on these changes and dynamic views, refer to the official Databricks documentation.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
The following code snippet is intended to create a view named shares_view with two columns: price (integer) and quantity (integer). The price column should only be visible to users who are members of the auditor group but not the compliance group. Which of the following options correctly completes the code?
CREATE VIEW shares_view AS
SELECT
_______________________________________
quantity
FROM shares;
CREATE VIEW shares_view AS
SELECT
_______________________________________
quantity
FROM shares;
A
CASE WHEN isMember(‘auditor’) and isNotMember(‘compliance’) THEN price ELSE 0 END AS price,
B
CASE WHEN is_member(‘auditor’) and is_not_member(‘compliance’) THEN price ELSE 0 END AS price,
C
CASE WHEN isMember(‘auditor’) and NOT isMember(‘compliance’) THEN price ELSE 0 END AS price,
D
CASE WHEN is_member(‘auditor’) and NOT is_member(‘compliance’) THEN price ELSE 0 END AS price,
E
CASE WHEN member(‘auditor’) and not_member(‘compliance’) THEN price ELSE 0 END AS price,
No comments yet.