Applying row filters and column masks
Row filters and column masks let you enforce fine-grained, table-level security in Unity Catalog by attaching SQL user-defined functions (UDFs) to tables that dynamically filter rows or redact column values based on the querying user's identity or group membership. They are defined once at the table level and are automatically enforced across all compute (SQL warehouses, notebooks, jobs) without needing per-query logic.
1 · Learn the must-know
- Row filters and column masks are implemented as SQL functions (UDFs) registered in Unity Catalog before being attached to a table with ALTER TABLE ... SET ROW FILTER or ALTER COLUMN ... SET MASK.
- A row filter function must accept the relevant table columns as parameters and return a BOOLEAN indicating whether the row is visible to the current user.
- A column mask function must accept the column (and optionally other columns for conditional logic) and return a value of the same data type, typically using functions like
is_account_group_member() orcurrent_user() to decide whether to redact or transform the value. - A single table can have one row filter and multiple column masks (one per column) applied simultaneously, and both are enforced consistently regardless of the compute engine or client used to query the table.
- The user applying or altering a row filter/column mask needs sufficient privileges (typically table ownership or ALTER privilege) plus EXECUTE privilege on the underlying function, and the function must reside in a catalog/schema accessible to all who query the table.
- Row filters and column masks can be removed with ALTER TABLE ... DROP ROW FILTER or ALTER COLUMN ... DROP MASK, and changes take effect immediately for subsequent queries without needing to rewrite the underlying data.
2 · Check your understanding
A data engineer must restrict the Unity Catalog table sales.transactions so that most users only see rows where region equals 'EMEA', while members of the account-level group global_admins can see all rows. Which function definition, when applied as a row filter on the region column, meets this requirement?
What you have tried across DP-750's objectives, not a readiness score.
Set up and configure an Azure Databricks environment15-20% of the exam0 of 13 tried
Secure and govern Unity Catalog objects15-20% of the exam0 of 12 tried
Prepare and process data30-35% of the exam0 of 28 tried
Deploy and maintain data pipelines and workloads30-35% of the exam0 of 24 tried
3 · Keep going
Ready for more? Take a weighted mock or try free practice questions.