Unity Catalog protects regulated data with three layers: grants that decide who can touch a table, row filters and column masks that decide what they see inside it, and audit logs that record what happened. Each layer has limits on runtimes, views and sharing that you should know before you promise them to an auditor.
This guide follows the Databricks documentation on row filters and column masks and audit logs, checked November 27, 2026.
Row filters
A row filter is a SQL function that runs for each row at query time. Rows for which it returns false are excluded from the result. The owner of the table, or a user with MANAGE, binds the function to the table. The pattern is two statements: create the function, then set it on the table with ALTER TABLE ... SET ROW FILTER.
A typical regulated use is regional or business-line visibility, for example a trader in one desk seeing only that desk's positions. Keep the function simple. Databricks advises few arguments, deterministic expressions and SQL functions over Python ones, because the function runs on every query.
Column masks
A column mask is a SQL function that receives the column value and returns either the value or a masked version. Each column takes one mask, the return type must match the column type, and a mask can read other columns as inputs, which lets you unmask for approved roles only. You bind it with ALTER COLUMN ... SET MASK.
Databricks warns that a mismatch between function and column types causes casts, and with ANSI mode off a failed cast can quietly become null. It recommends turning ANSI mode on so that errors surface instead of hiding. That matters for evidence: a mask that silently returns null looks like protection and is really a bug.
Control list
| Control | What it does | Limit to state plainly |
|---|---|---|
| --- | --- | --- |
| Grants to groups | Decide who can read a table at all | Only as good as your group hygiene |
| Row filter | Hides rows by user or group | Not applicable to views; not supported below runtime 12.2 LTS |
| Column mask | Replaces a column value for some users | One mask per column; type mismatches can return null |
| Attribute-based policies | Apply one rule across many tables by tag | Databricks recommends them for consistency at scale; check feature status for your plan |
| Audit log | Records who did what, when | Regional; retention not stated on the page, so copy what you must keep |
| Lineage | Shows what feeds what | See our lineage guide |
Limits that surprise teams
- Tables with row filters or column masks cannot be shared through Delta Sharing at the table level, according to the Databricks page.
- Time travel and clones are not supported on these tables.
- Path-based file access bypasses nothing and is also not supported, so make sure no job reads the underlying files directly.
- On dedicated compute, Databricks documents minimum runtime versions and a serverless requirement for fine-grained access control. Writes need a newer runtime than reads.
Each of these shows up in testing, not in design. Run your real queries, jobs and exports against a filtered table before launch.
Audit logs
Unity Catalog events land in system.access.audit. Each row has an action name and service name, the identity that acted, the source address, the time, and the request and response. Account-level events carry a workspace id of zero. Some SQL definition fields are hidden unless you are an account admin or in a designated group.
For reviewers, three questions come up again and again. Who read this table in the quarter? Who changed a grant, and when? Who can read it today? Write a saved query for each, run it on a schedule, and store the output where your normal records retention applies. The system table is a source, not an archive.
Scenario: a claims table
This is an illustration, not a client. Suppose an insurer holds a claims table with a policyholder name, national identifier and claim amount. Adjusters should see the rows for their region. Fraud analysts should see every region but only the last four digits of the identifier. Auditors should see counts and amounts but never the identifier.
A row filter keyed on the user's group handles regions. A column mask on the identifier returns the full value for a small privileged group, the last four digits for fraud analysts and a fixed string for everyone else. Grants decide which groups reach the table at all. The audit table then answers who ran what against it.
Each piece is small. The risk sits in the joins between them: a view built over the table, a job that reads the files by path, a share to a partner. Those are the paths to test first.
Designing for the audit question
Reviewers rarely ask how a mask works. They ask who could see the raw value in a given quarter, and how you know. Design backwards from that. Keep the privileged group small and named. Log changes to its membership in your identity provider. Make the mask function readable, with a comment that states the rule in plain words, so that a reviewer can read the function itself as evidence.
What we check before sign-off
- Every regulated table has a named owner group and a grant list exported to evidence.
- Filters and masks are tested on every compute type your jobs and users use.
- No path-based access reaches the same files.
- The three audit queries run and their output is stored.
- A change process exists for adding a role or a mask.
Duczer East builds and tests these controls as part of Unity Catalog consulting. For the wider view, see data access governance and our note on attribute-based access and dynamic masking for AI data.



