A data governance team wants to implement row-level security on a Unity Catalog table hr.employees so that each manager can only see rows where the manager_id column matches their own user identity. The solution must be maintainable without modifying the base table. Which Unity Catalog feature should they use?
- A. A table property setting
row_filter = current_user() - B. A dynamic view with a WHERE clause referencing
current_user() - C. A column mask applied to the
manager_idcolumn - D. A row filter function assigned to the
hr.employeestable✓ Correct
Explanation
Row filter functions in Unity Catalog allow you to define a SQL function that is automatically applied as a WHERE clause whenever the table is queried, without modifying the table itself. The function can reference current_user() or is_member() to enforce per-user or per-group filtering, exactly meeting the requirement. A column mask applies a transformation to a column's value (e.g., masking PII) but does not filter rows; it cannot hide entire rows from a user. A dynamic view with current_user() works for row-level security but requires creating and maintaining a separate view object and does not meet the 'without modifying the base table' intent as cleanly as a row filter, and users must be directed to the view rather than the table. There is no built-in row_filter table property in Unity Catalog; row filters are registered as catalog functions and then assigned via ALTER TABLE ... SET ROW FILTER.