Databricks Field Guide

Storing · Chapter 05

What is Unity Catalog? Databricks governance in practice

Reviewed by TechFabric engineers. How we write this guide →

Unity Catalog is the governance layer built into Databricks. It registers every table, view, volume, model and function in a three-level catalog.schema.object namespace, decides who may read or change each one, enforces row filters and column masks on every query, and records lineage and an audit log of every access. It's switched on automatically for every workspace created after 8 November 2023.

It's the part of Databricks we'd spend the most care on at the start, because it's the hardest to change later and it decides whether the platform can be trusted with regulated data. This chapter is the layout we'd use, the rules we'd enforce from the first grant, the SQL for each, and the edges where Unity Catalog stops and something else has to take over. It also carries a worked design by one of our engineers, Sushruth Aeluguri, for regulated data on a FHIR lakehouse: a row filter that works exactly as written and still hands restricted rows to the wrong caller through an agent's service principal, and the same filter's effect on a vector index over clinical notes.

The short version

Unity Catalog is the register of what data your organisation has and the gatekeeper for who is allowed to see it. Every table, file, dashboard, model and function sits in one place, with one set of rules about access and one record of every time somebody looked at something. Without it, permissions live inside each separate tool, so the answer to who can see customer records is assembled by hand from four systems and is out of date by the time you finish. With it, that question is a query with one answer, and the evidence an auditor asks for comes back in minutes rather than over a fortnight. It's also the layer that makes it safe to say yes when a new team asks for access.

How does Unity Catalog work? #

Objects live in a three-level namespace of catalog.schema.object. A metastore at the account level holds the catalogs for one region, and Databricks recommends a single metastore per region shared by every environment and business unit, separated by catalogs (best practices). Storage credentials, external locations, connections and shares sit directly under the metastore and describe where data physically lives and who may reach it. Grants inherit downward, so a privilege on a catalog applies to its schemas and their tables unless something more specific intervenes. Everything readable is lineage-tracked and every access is audited.

The part that surprises people coming from a database background is how much is governed beyond tables. Volumes hold files, so PDFs, images and model checkpoints get the same permission model as a table, and registered models, functions, connections to external systems, and model and MCP services are securable objects too. That's what lets an access review cover the whole platform rather than only the relational part of it.

no

yes

yes

no

User or service principal

Account group membership

Grant on catalog
schema or table

Access denied

Row filter or
column mask attached

Rewrite query
filter rows, mask columns

Storage credential
fetches files

Audit record
in system tables

How a query resolves a permission before returning a row

The credential step is worth pausing on. Users never hold cloud storage permissions themselves; Unity Catalog holds them and issues short-lived, down-scoped credentials for exactly the files a permitted query needs. That's why removing a grant actually removes access, instead of closing one of several routes to the same bucket.

What is a catalog in Databricks? #

A catalog is the top level of the namespace, the first part of catalog.schema.table, and the unit most access and isolation decisions are made at. It holds schemas, which hold tables, views, volumes, functions and models. A catalog can be bound to particular workspaces, so a production catalog is invisible from a development workspace even to someone who holds a grant on it, and it can be a foreign catalog that mirrors a database somewhere else through Lakehouse Federation. New catalogs are OPEN to every workspace on the metastore until you bind them.

How we'd lay out catalogs #

We'd use catalogs as the environment and domain boundary, and schemas as the data product boundary. A catalog per environment per domain, named {domain}_{environment}, gives you a namespace meaningful to humans, maps cleanly onto access control, and makes a promotion from staging to production a change of one path segment. Inside a catalog, schemas correspond to the medallion layers or to individual data products depending on the domain's maturity, which is covered in The Medallion Architecture.

Production isolation needs a binding as well as grants. This is the workspace binding we'd apply to every production catalog the day it's created, with the Databricks CLI (the workspace ID is the number in the workspace URL):

databricks catalogs update originations_prd --isolation-mode ISOLATED

databricks workspace-bindings update-bindings catalog originations_prd --json '{
  "add": [{"workspace_id": 1234567890123456, "binding_type": "BINDING_TYPE_READ_WRITE"}]
}'

A development workspace that needs production data for a one-off comparison gets a BINDING_TYPE_READ_ONLY binding, written down with its end date, rather than a grant that outlives the reason for it.

The decisions we'd make before the first grant #

Most of what's expensive about Unity Catalog later was decided, often by default, in its first week. These are the calls we'd make explicitly and write down.

Decision What we'd choose Why it's hard to change later
Catalog boundary Domain and environment, {domain}_{environment} Every query, job and dashboard embeds the three-part name
Who owns objects A group per catalog, never a person Ownership transfers can remove access that jobs depend on
Where policies live Masking and filter functions in the repository, with tests A policy edited in the UI has no review and no history
Production isolation Production catalogs ISOLATED and bound to the production workspace Grants alone are one mistake away from a dev user reading production
Managed or external Managed tables and volumes by default, as Databricks also recommends External storage paths leak into code and break on moves
Tags A small governed tag taxonomy before the first ABAC policy Policies match on tag values, so renaming a tag means rewriting policies

The access review that this layout makes cheap is one query. To see every group holding a privilege on a production catalog's tables:

SELECT grantee, table_schema, table_name, privilege_type, inherited_from
FROM system.information_schema.table_privileges
WHERE table_catalog = 'originations_prd'
ORDER BY grantee, table_schema, table_name;

Any grantee in that list that's a person's email rather than a group is the first finding of the review.

Grants belong to groups, never to people #

This is the rule we'd enforce hardest. Every grant is made to an account-level group whose membership is managed in the identity provider, and no user, service principal, or one-off exception ever holds a direct grant. Direct grants are invisible to the process that governs access. When someone leaves, the identity provider removes them from groups and their access disappears everywhere; a direct grant made during an incident eighteen months ago doesn't. It's also the difference between an access review that takes an afternoon and one that takes a week. We'd keep the taxonomy small and predictable, typically a reader, a writer and an owner group per catalog, with more only where a genuine third pattern exists.

-- The shape we'd give every grant
GRANT USE CATALOG ON CATALOG originations_prd TO `originations-prd-readers`;
GRANT USE SCHEMA, SELECT ON SCHEMA originations_prd.gold TO `originations-prd-readers`;

GRANT USE CATALOG ON CATALOG originations_prd TO `originations-prd-writers`;
GRANT USE SCHEMA, MODIFY, SELECT ON SCHEMA originations_prd.silver TO `originations-prd-writers`;

ALTER SCHEMA originations_prd.gold OWNER TO `originations-prd-owners`;

Two details make that pattern hold. USE CATALOG and USE SCHEMA are required on the parents before SELECT on a table means anything, so a reader group missing USE CATALOG sees nothing and files a ticket that looks like a broken grant. And ownership sits with a group too, because an object owned by a person loses its owner's access the day they leave, and transferring it later can take away access that dashboards and jobs depended on. Databricks' own guidance says the same for production catalogs and schemas.

How do row filters and column masks work in Unity Catalog? #

A row filter is a SQL function returning a boolean, attached to a table, that Unity Catalog evaluates for every row of every query; a column mask is a function attached to one column that returns what the caller sees in place of the value. Both run as the caller, so is_account_group_member() inside them decides per person. There are two ways to attach them.

On one table. The function is attached directly, which is clear and doesn't scale:

CREATE FUNCTION originations_prd.gov.region_visible(region STRING)
RETURNS BOOLEAN
RETURN is_account_group_member('originations-all-regions')
    OR region = 'us-west';

ALTER TABLE originations_prd.gold.loan_book
  SET ROW FILTER originations_prd.gov.region_visible ON (region);

CREATE FUNCTION originations_prd.gov.mask_ssn(ssn STRING)
RETURNS STRING
RETURN CASE WHEN is_account_group_member('originations-pii') THEN ssn
            ELSE concat('***-**-', right(ssn, 4)) END;

ALTER TABLE originations_prd.gold.loan_book
  ALTER COLUMN borrower_ssn SET MASK originations_prd.gov.mask_ssn;

By tag, with an ABAC policy. Attribute-based access control attaches the function to every table under a catalog or schema whose columns carry a governed tag, so the table created next Tuesday is protected the moment it's tagged. Databricks recommends ABAC whenever the same filtering or masking applies across many tables, and a policy set by an admin can't be removed by a table owner. The policy syntax:

CREATE FUNCTION originations_prd.gov.ssn_last_digits(ssn STRING, n INT)
RETURNS STRING
RETURN right(ssn, n);

CREATE POLICY mask_ssn
ON CATALOG originations_prd
COMMENT 'Show only the last four digits of any column tagged pii=ssn'
COLUMN MASK originations_prd.gov.ssn_last_digits
TO `account users` EXCEPT `originations-pii`
FOR TABLES
MATCH COLUMNS has_tag_value('pii', 'ssn') AS ssn
ON COLUMN ssn
USING COLUMNS (4);

The runtime matters more than teams expect. Table-level filters and masks need Databricks Runtime 12.2 LTS or above, and on dedicated (single-user) compute they need 15.4 LTS with serverless enabled in the workspace, read-only until 16.3. ABAC needs serverless, or standard or dedicated compute on Runtime 16.4 or above; older clusters can't read an ABAC-secured table at all, which is a migration task to schedule before the first policy, not after. Only one distinct row filter may resolve for a given table and user, and one mask for a given column and user. If two apply, the query fails with an error rather than picking one.

Both share a failure mode, which is that the policy becomes undocumented business logic in a SQL function nobody owns. We'd keep the functions in the repository with the pipelines, review them like application code, and write tests asserting that a masked reader sees what they should and no more.

A table with a table-level filter or mask also loses some things: time travel, clones, and OpenSharing of that table, and MERGE is refused when the policy uses aggregations, windows or non-deterministic functions (limitations).

A worked design: a row filter that fails closed, and what it means for an index #

Sushruth Aeluguri, a Databricks Engineer at TechFabric, worked this through as a design, not a client engagement, in Unity Catalog for AI agents in practice, a set of illustrative scenarios for a FHIR lakehouse that normalises CCD documents and FHIR bundles into FHIR R4 tables, where substance use records under 42 CFR Part 2 must stay hidden from coordinators outside a consented group. His row filter reads a sensitivity column the pipeline writes from each resource's meta.security labels, and it's deliberately closed: a row whose label is NULL is hidden from anyone outside part2_consented, because a missing label means the normalisation job failed, and the safe reading of a failed label is that the row might be Part 2.

CREATE FUNCTION health.gov.part2_visible(sensitivity STRING)
RETURNS BOOLEAN
RETURN is_account_group_member('part2_consented')
   OR (sensitivity IS NOT NULL AND sensitivity = 'unrestricted');

Two lessons from his write-up carry to any regulated table. The pipeline job that populates the column the filter reads is part of the access control, so it needs a test that fails when the column is null on a resource that carried a label. And the protection stops at the table. His post treats the filters as what keeps the clinical notes out of a vector index, and Databricks' current pages draw a finer line, which is the one we'd design to: a table-level row filter or column mask blocks creating an AI Search index from that table, but an ABAC policy doesn't. An index built from an ABAC-protected table syncs every row, and Databricks says it "doesn't enforce row filter or column mask policies when serving queries." So nothing in Unity Catalog stops restricted notes from reaching the index; the access control on the index has to be its own, starting with the index's columns-to-sync setting to keep masked columns out. He sets out the three ways round it (a de-identified source table, one index per access tier, or filtering after retrieval inside the tool function) in the same post, and Context and Retrieval picks it up.

Identity decides what the filter does #

The same write-up makes the point most teams learn late: a row filter evaluates against whoever runs the query, so the identity behind a tool or a job decides what the filter protects. The test he recommends takes an afternoon. Call the same tool twice against the same patient, once on behalf of a coordinator outside part2_consented and once as a service principal with broad read access. In his design the second call succeeds with no error and no empty result: it returns everything the principal may see, Part 2 conditions and unmasked SSNs included, and there's nothing in any log to alert on.

Caller Identity we'd use The grant we'd give it What goes wrong otherwise
A person through an agent or app On behalf of the user None beyond the user's own A broad service principal answers with rows the user can't see, silently
A nightly batch with no end user A service principal EXECUTE on the same narrow functions a person calls, or SELECT on named tables GRANT SELECT ON CATALOG means a leaked token's blast radius is the catalog
A batch that must see restricted rows A service principal admitted to the consented group Group membership, written down with the reason An exempt principal nobody decided on is a policy hole nobody reviews

Two mechanics from the post shape how we'd write the grants. The tool an agent calls is a Unity Catalog function with a narrow signature and no consent logic in its body, granted like data, so the row filter is the one place that decision lives and the tool author can't forget it:

CREATE FUNCTION health.agent_tools.get_active_conditions(patient_id STRING)
RETURNS TABLE (code STRING, display STRING, onset_date DATE)
RETURN SELECT code, display, onset_date
       FROM health.fhir.condition
       WHERE subject_id = patient_id AND clinical_status = 'active';

GRANT EXECUTE ON FUNCTION health.agent_tools.get_active_conditions TO `care_coordinators`;

And a GRANT policy grants by tag instead of by object, but effective privilege is the union of direct grants and GRANT policies, so a selective policy takes nothing away from a principal that already holds a direct grant on the object, its schema or its catalog. Inventory direct grants before you rely on a policy, or the policy is a second opinion rather than the control. The cost side is in the same post: a filter that joins a consent mapping table runs that lookup per row on every scan by every user, so we'd denormalise the decision into a column in the pipeline and let the filter read the column.

Leaving DBFS and the Hive metastore behind #

Two older patterns keep data outside everything this chapter describes. Both still run, which makes them easy to leave in place, and while they stay, nothing stops the next notebook from being written against them. We'd put their removal on the plan with a date.

DBFS mount
one credential, every user

Volume or
external location

DBFS root paths
dbfs:/FileStore, /dbfs/

hive_metastore tables

Unity Catalog tables

Grants, lineage,
audit on every read

What each legacy path moves to, and what it gains

DBFS mounts and paths, and volumes instead #

A mount makes a cloud storage path look like a local folder under /mnt, read with whatever credential mounted it. Every user of the workspace then reads it with that credential: "All users in the Databricks workspace have access to the mounted ADLS account", and a bucket mounted with keys gives all users read and write access to every object in it (mounting cloud object storage). No grant decides who reads what, no lineage records it, and mounted data "does not work with Unity Catalog". Databricks now says both DBFS root and DBFS mounts are deprecated and not recommended, and that new accounts are provisioned without them (DBFS), and mounts aren't compatible with serverless compute (mounting cloud object storage). The cost of staying is concrete: a notebook that reads /mnt/raw can't move to serverless, and every file under the mount is readable by anyone who can open a notebook.

We'd register the storage once as an external location and expose it as a volume, then read and write by the volume path, which is the same from Spark, SQL and Python (volumes):

CREATE EXTERNAL LOCATION IF NOT EXISTS acme_landing URL 's3://acme-landing/raw' WITH (STORAGE CREDENTIAL acme_landing_cred);

CREATE EXTERNAL VOLUME IF NOT EXISTS sales_prd.bronze.landing LOCATION 's3://acme-landing/raw/landing';

-- reading a volume also needs USE CATALOG and USE SCHEMA on its parents
GRANT USE CATALOG ON CATALOG sales_prd TO sales_ingest;
GRANT USE SCHEMA ON SCHEMA sales_prd.bronze TO sales_ingest;
GRANT READ VOLUME ON VOLUME sales_prd.bronze.landing TO sales_ingest;
catalog = dbutils.widgets.get("catalog")
orders = spark.read.format("json").load(f"/Volumes/{catalog}/bronze/landing/orders/")

with open(f"/Volumes/{catalog}/bronze/landing/reference/regions.csv") as f:
    header = f.readline()

Files people kept in the DBFS root, such as dbfs:/FileStore uploads, libraries and scripts, move the same way: data into a managed volume, code into workspace files or the repository. Databricks doesn't recommend keeping production data, libraries or scripts in the DBFS root at all (DBFS).

Two things this isn't. A dbfs:/Volumes/... path is a volume with an optional scheme, and the DBFS warnings apply only to the root and mounts (DBFS). And on an old workspace, existing mounts keep serving existing jobs until each job moves; we'd stop adding new ones rather than break the old ones in a day.

Staying on the Hive metastore #

Every workspace still carries the built-in Hive metastore, shown in Unity Catalog as the hive_metastore catalog, and Databricks now says that "data governance using Hive metastore is deprecated" and recommends migrating all of its data to Unity Catalog (Hive metastore). A table left there misses the rest of this chapter: its permissions stay in the legacy table ACLs, outside Unity Catalog, with no row filters or masks, no lineage, and no predictive optimisation, which acts only on Unity Catalog managed tables (Tables and storage). It also drops out of the access review, since the information schema doesn't list hive_metastore objects (Security). Each new job that reads hive_metastore.sales.orders adds one more name to change on migration day.

We'd move tables schema by schema and point new code at the Unity Catalog name from the start. Databricks' upgrade guide offers three routes: federate the Hive metastore and convert its tables in place with SET MANAGED MOVE or SET EXTERNAL, which it recommends; upgrade directly with SYNC or CREATE TABLE AS SELECT; and the Databricks Labs UCX tooling for a large estate (upgrade to Unity Catalog). For a handful of tables the direct route is the short one, SYNC with a dry run first:

-- an external Hive table: see what would happen, then register it in Unity Catalog
SYNC TABLE sales_prd.silver.orders FROM hive_metastore.sales.orders DRY RUN;
SYNC TABLE sales_prd.silver.orders FROM hive_metastore.sales.orders;

-- or a copy into a managed Unity Catalog table, clustered on the way in
CREATE TABLE sales_prd.silver.customers CLUSTER BY AUTO
AS SELECT * FROM hive_metastore.sales.customers;

A copy starts with an empty history and none of the old table's permissions, so the grants go on the new name before anyone is pointed at it, and time travel to earlier versions stays with the old table until it's dropped.

There is no lasting case for staying; there is only the order of the move. Jobs read hive_metastore until their own tables move, and the statements above have to name it.

Beyond the basics #

The features below are where Unity Catalog stops being a permissions system and starts being a governance platform. ABAC row filter and column mask policies, governed tags and data classification are generally available, so on a new estate we treat them as design decisions to make up front rather than as extras to grow into. Some edges are still in Beta as of October 2026: ABAC policies on views, policies attached at the metastore level, ABAC DENY policies, and automated tag assignment.

Governed tags and tag policies. Governed tags are account-level tags with enforced allowed values and a controlled list of who may apply them. They're what ABAC policies match on, so the taxonomy is the policy surface: a tag called pii with values ssn, email and phone is three masking policies waiting to be written.

Data classification. Databricks scans catalogs with an AI system, proposes tags for sensitive columns, and can apply them automatically, which then feeds the ABAC policies above. New tables and columns are usually picked up within 24 hours, results land in system.data_classification.results, and the scans bill as serverless usage under billing_origin_product = 'DATA_CLASSIFICATION' (data classification). We'd treat the proposals as an inventory a person confirms rather than a control in themselves, but as a way to find personal data nobody documented they beat a survey comfortably.

Lakehouse Federation. Unity Catalog can register a connection to an outside system and expose its tables as a foreign catalog queried in place. Query federation covers MySQL, PostgreSQL, Teradata, Oracle, Redshift, Salesforce Data 360, Snowflake, SQL Server, Azure Synapse, BigQuery and other Databricks workspaces; catalog federation reads Hive metastores, AWS Glue, Snowflake and a few others directly (query federation). Federation doesn't remove the need for pipelines. What it does is put governance and discovery over the whole estate on day one so the data can move later, which is why a migration as described in Migration can start with governance rather than end with it.

OpenSharing and clean rooms. OpenSharing, previously named Delta Sharing, is an open protocol for giving another organisation live read access to a table without copying it and without them needing a Databricks account. Clean rooms build on it so two parties can compute over combined data with neither seeing the other's rows. For partner data this replaces the file drop and the reconciliation meeting that follows it; Sharing and Collaboration has the detail.

Volumes and service credentials. A managed volume is a governed directory, so landing zones, model artefacts, exported reports and images get the same grants, lineage and audit trail as tables, which matters more every year as unstructured data becomes model input. Service credentials extend the same model to outbound calls, so a job reaching a cloud API uses a governed credential rather than a secret pasted into a notebook.

System tables as the governance surface. The system catalog exposes audit logs, table and column lineage, grants, query history and billing as ordinary governed tables. An access review becomes a query, so does asking who read a table last quarter, and so does asking what breaks if a column is dropped.

Governing a whole data estate, not just a warehouse

Capability Databricks AWS Azure GCP
Single permission model across engines Unity Catalog governs SQL, Python, streaming, ML and BI alike Lake Formation for lake tables, separate Redshift grants Per-engine permissions, Purview mainly catalogues rather than enforces BigQuery IAM plus Dataplex policies
Files, models, and functions as securables Volumes, registered models, and functions in one namespace S3 policies, SageMaker permissions, all separate Storage ACLs and Azure ML permissions, separate Cloud Storage IAM and Vertex AI permissions, separate
Lineage Captured automatically to column level, queryable as tables Glue and DataZone lineage, partial coverage Purview lineage, coverage varies by source Dataplex lineage
Sharing outside the organisation OpenSharing, open protocol, no copy Data Exchange or a copy A copy, or a Purview-catalogued share Analytics Hub, within BigQuery
Federated query over other systems Foreign catalogs governed by the same grants Athena federation, governed separately Synapse links, governed separately BigQuery Omni and external connections

To be fair, Purview is stronger at cataloguing the parts of a Microsoft estate that have nothing to do with analytics, and BigQuery's governance inside BigQuery is excellent. The argument for Unity Catalog is coverage and enforcement in one place, meaning one model that applies whether the access came from a SQL editor, a Python job, a dashboard or a model, with the audit record for all of them landing in the same queryable table.

What Unity Catalog doesn't govern #

This boundary matters most for anything agentic. Unity Catalog governs access to data, and it doesn't govern what a system does with that data once it's read or what business actions it takes in other systems.

An agent with legitimate read access to a customer's loan record that then calls an API to change that loan's terms has violated no Unity Catalog policy, because no data access rule was broken. The action layer needs its own governance, which is the subject of Governed Actions, and we'd keep it in a separate policy evaluation layer instead of trying to express business-action policy in catalog grants.

read request

permitted

write to core system

approved

refused

Agent or application

Unity Catalog

Governed tables
and volumes

Action policy layer

Loan or CRM system

Decision log

The boundary between data governance and action governance

How to find what depends on a table with lineage #

Lineage is captured automatically for tables, columns, notebooks, jobs, dashboards and Genie Agents, so questions that used to require archaeology become queries. We'd wire it into the change process so a pull request touching a gold table lists its downstream consumers automatically, which is the cheapest safety net we know of. The lineage system table keeps a rolling year, and its entity_metadata column says which job, notebook, dashboard, pipeline or Genie Agent did the reading or writing:

-- What read originations_prd.gold.loan_book in the last 90 days, and what it wrote
SELECT
  target_table_full_name,
  entity_metadata.job_info.job_id            AS job_id,
  entity_metadata.notebook_id                AS notebook_id,
  entity_metadata.dashboard_id               AS dashboard_id,
  entity_metadata.dlt_pipeline_info.dlt_pipeline_id AS pipeline_id,
  entity_metadata.genie_space_id             AS genie_agent_id,
  max(event_time)                            AS last_seen
FROM system.access.table_lineage
WHERE source_table_full_name = 'originations_prd.gold.loan_book'
  AND event_date >= current_date() - INTERVAL 90 DAYS
GROUP BY ALL
ORDER BY last_seen DESC;

Rows with a null target_table_full_name are pure reads: the dashboard, the Genie Agent, the notebook someone opens monthly. Those are the consumers a schema change breaks without any pipeline failing, so they're the ones we'd make sure appear in the pull request.