🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Unity Catalog Governance: Grants, Lineage, and Delta Sharing

Azure Data EngineeringUnity Catalog⭐ Premium
Azure Data Engineering

Governance that lives with the data, not beside it

13 min readđŸ”ŦAdvanced

Prerequisites

  • !Databricks workspaces, clusters, and the Hive metastore legacy
  • !Delta Lake table storage on ADLS Gen2
  • !Azure AD groups and service principal concepts

What You'll Learn

  • 1Model data ownership with the catalog, schema, and table hierarchy
  • 2Apply grants, row filters, and column masks for fine-grained access
  • 3Consume automatic lineage for impact analysis and compliance
  • 4Share data externally with Delta Sharing without copying it

The metastore problem Unity Catalog solves

Before Unity Catalog, each Databricks workspace owned its own metastore. Grants lived in workspace-specific ACLs, so the same table could be readable in one workspace and invisible in another, and nobody could answer "who has access to customer data" without querying every workspace in turn. Unity Catalog replaces that with a single account-level metastore per region, shared across every workspace attached to it. Access is managed once, enforced everywhere, and every grant is auditable in one place.

The governance model is a three-level namespace: catalog, then schema, then table, view, or volume. Each level is securable, meaning you can grant at any of the three, and permissions inherit downward unless overridden. Volumes are the often-overlooked fourth securable type: they govern unstructured files in managed or external storage, closing the gap where a team could restrict table access while leaving the raw underlying Parquet files reachable through a volume mount.

SecurableTypical ownerCommon grantsInheritance behavior
CatalogData platform teamCREATE SCHEMA, USE CATALOGGrants flow to all schemas below
SchemaDomain data ownerCREATE TABLE, USE SCHEMAGrants flow to all tables below
TableDomain data ownerSELECT, MODIFYTerminal level for tabular data
VolumeDomain data ownerREAD VOLUME, WRITE VOLUMEGoverns unstructured file access
Stored procedureEngineering teamEXECUTEUsed for controlled write paths

Granting access without drowning in permissions

The grant model is intentionally explicit, which is a strength and a maintenance burden. The durable pattern is to grant to Azure AD groups, never to individual users or service principals, with one group per role in the data estate: analysts-read-sales, engineers-write-curated, and so on. Group membership is managed in Azure AD, so offboarding happens in one system and propagates automatically. When a query returns "permission denied," the fix is almost always group membership, not a missing grant.

Row-level filters and column masks extend the same model down to the data itself. A column mask can render email addresses as partially redacted values for everyone except a support role, and a row filter can restrict analysts to rows matching their region without maintaining separate table copies. Both are defined in SQL, versioned with the table's governance configuration, and evaluated at query time so revoking a role revokes the data exposure immediately rather than at the next ETL run.

python
from databricks.sdk import WorkspaceClient
from databricks.sdk.service import catalog as uc

w = WorkspaceClient()

# Grant read on a curated table to the analyst group
w.grants.update(
    securable_type=uc.SecurableType.TABLE,
    full_name="sales_curated.fact_orders",
    changes=[uc.Principal("data-analysts", [uc.Privilege.SELECT], uc.Grant)],
)

# Give the engineering group write on the raw schema
w.grants.update(
    securable_type=uc.SecurableType.SCHEMA,
    full_name="sales_raw",
    changes=[uc.Principal("data-engineers", [
        uc.Privilege.SELECT, uc.Privilege.MODIFY, uc.Privilege.CREATE_TABLE,
    ], uc.Grant)],
)

# Apply a column mask so email is redacted outside the support role
w.statement_execution.execute_statement(
    warehouse_id=WAREHOUSE_ID,
    statement="""
        ALTER TABLE sales_curated.fact_orders
        ALTER COLUMN customer_email
        SET MASK sales_curated.pii_mask
        USING COLUMNS (role STRING)
    """,
)

# Restrict analysts to their region with a row filter
w.statement_execution.execute_statement(
    warehouse_id=WAREHOUSE_ID,
    statement="""
        ALTER TABLE sales_curated.fact_orders
        SET ROW FILTER sales_curated.region_filter
        ON (region STRING)
    """,
)

Automatic lineage and why it changes incident response

Unity Catalog records lineage automatically whenever a query reads and writes registered tables, tracking column-level flows through notebooks, jobs, SQL warehouses, and pipelines. That eliminates the manual lineage spreadsheets that every data team maintains and abandons. More importantly, it changes what incident response looks like: when a revenue number is disputed, you can query the lineage API for every upstream table feeding the disputed column, then walk back until you find the first table where the value diverged from its source.

The compliance dimension is equally practical. Regulators increasingly ask not just whether data is protected, but whether the organization can demonstrate where it flows. Automatic lineage answers that with a query rather than a two-week documentation exercise. The caveat is coverage: lineage is captured for activity that runs through Unity Catalog-governed compute, so workloads still using the legacy hive_metastore outside UC are invisible. Completing the migration is a prerequisite for trusting the graph.

python
def column_lineage(table: str, column: str) -> dict:
    """Return upstream columns feeding a specific downstream column."""
    result = w.lineage.list_column_lineage(
        table_name=table,
        column_name=column,
    )
    upstream = [
        {"table": u.source_table_full_name, "column": u.source_column_name}
        for u in result.upstreams
    ]
    print(f"{len(upstream)} upstream sources for {table}.{column}")
    for u in upstream:
        print(f"  {u['table']}.{u['column']}")
    return {"downstream_column": column, "upstream": upstream}

def impact_analysis(table: str) -> list[str]:
    """All tables that depend on the given table, for change reviews."""
    result = w.lineage.list_table_lineage(table_name=table, direction="OUT")
    downstream = [d.source_table_full_name for d in result.downstreams]
    print(f"changing {table} affects {len(downstream)} downstream tables")
    return downstream

Delta Sharing: external data without a copy

Delta Sharing is an open protocol that lets a Databricks data provider share live Delta tables with recipients who may not run Databricks at all. The recipient reads through a secure share URL with a token, and the data is streamed on read rather than copied out, so the provider retains control and the recipient always sees current values. This replaces the nightly CSV drop into a partner SFTP share, which was stale the moment it landed and unauthorized the moment it left.

Recipients authenticate with a token or, in the more mature setup, with an OAuth-secured identity. The provider can share specific tables or entire schemas, and revocation takes effect on the next read rather than requiring recall of an exported file. For data engineering teams, the operational win is that the sharing surface is governed by the same Unity Catalog grants model as internal access, so one audit trail covers both.

python
# Create a share and add governed tables to it
w.shares.create(name="partner_sales_2026", comment="Quarterly partner sales extract")
w.shares.update(
    name="partner_sales_2026",
    add=[
        uc.ShareUpdate(name="sales_curated.fact_orders"),
        uc.ShareUpdate(name="sales_curated.dim_customer"),
    ],
)

# Invite a recipient who will read with a token
recipient = w.recipients.create(
    name="acme-corp",
    authentication_type="TOKEN",
    sharing_code="acme-onboarding-code",
)
print(f"recipient created; activation link issued to {recipient.name}")

# Revoke access when the partnership ends, no file recall needed
w.recipients.delete(name="acme-corp")
print("recipient revoked; future reads will fail")

Migration and the operational checklist

Moving an existing workspace to Unity Catalog is a sequenced project, not a checkbox. Attach the workspace to an account-level metastore, upgrade managed tables through the lineage-aware upgrade workflow, and remap external tables so their storage credentials become UC storage credentials rather than ad hoc mounts. ACLs must be re-expressed as UC grants before the legacy metastore is decommissioned, and every integration that mounted storage directly needs review.

The checklist that keeps migrations from stalling includes verifying that every cluster has UC enabled, confirming job definitions reference catalog-qualified table names rather than relying on a default catalog, and running a parallel period where both access models are observable so surprises surface before cutover. Treat the metastore itself as production infrastructure with a backup and restore story, because a misconfigured metastore is an organization-wide outage.

Storage credentials, external locations, and volumes

Unity Catalog governs unstructured files through volumes, and the credentials that back them through storage credentials and external locations. A storage credential carries the identity, such as a managed identity or service principal, that Unity Catalog assumes when reading or writing cloud storage. An external location binds that credential to a specific path and becomes the mount point that table and volume DDL reference. Separating the credential from the location means one identity can back several paths across environments, and rotating the identity is a single update rather than a migration of every dependent object.

Managed tables simplify this further: Unity Catalog manages the storage location and the credential on your behalf, so a data engineer creating a table never touches cloud storage configuration at all. The trade-off is control. Teams with strict requirements around storage accounts, lifecycle tiers, or customer-managed keys typically register external locations against their own accounts and keep tables external, accepting the extra configuration in exchange for that control. Volumes sit in the same model: a managed volume is provisioned by the catalog, while an external volume points at a registered location, and both are securable with read and write privileges that apply to the files inside.

This layer is also where audit completeness is won or lost. Access through a registered external location is logged under the querying identity, while any access path that bypasses Unity Catalog, such as an old workspace mount or a direct storage account key, is invisible to the grant model and to the audit trail. Eliminating those bypasses during migration is not optional cleanup; it is the precondition for claiming the governance model actually covers the data.

Common Mistakes

Granting table access directly to individual users

Fix: Grant only to Azure AD groups with one group per data role; membership changes then propagate from a single offboarding workflow

Assuming lineage covers workloads still running on the legacy hive metastore

Fix: Complete the Unity Catalog migration and confirm lineage appears for the pipelines you rely on before trusting the graph in incident response

Building separate regional copies of a table for each partner instead of using Delta Sharing

Fix: Share the governed table through a share and recipient token; revocation is instant and no copy leaves your perimeter

Leaving storage credentials as workspace mounts during migration

Fix: Convert mounts to Unity Catalog storage credentials and external locations so access is governed by the same grant model as tables

Best Practices

  • Model one Azure AD group per data role and keep all grants group-based
  • Apply column masks and row filters at the table rather than maintaining redacted copies
  • Query impact analysis before every schema change to a governed table
  • Version governance changes such as masks and filters alongside application code
  • Back up metastore configuration and rehearse restores on a schedule

Interview Questions

Q1: What are the three levels of the Unity Catalog hierarchy?

Catalog, schema, and then table, view, or volume. Each level is securable, so grants can be issued at any level and inherit downward. Volumes extend governance to unstructured files, which the legacy metastore did not cover.

Q2: How does Unity Catalog differ from workspace-level access control?

Workspace-level ACLs are scoped to a single workspace, so the same table can have different effective permissions in different workspaces and there is no central audit point. Unity Catalog provides one account-level metastore per region with consistent grants and lineage across every attached workspace.

Q3: How is row-level security implemented?

A row filter defined in SQL is attached to the table and evaluated at query time against the querying user's identity or group. Analysts see only rows matching their predicate, the underlying table has a single copy, and revoking a role revokes the exposure immediately.

Q4: Explain Delta Sharing and when to use it.

Delta Sharing is an open protocol for sharing live Delta tables with external recipients via a secure token, without copying data. Recipients read current values on demand, providers revoke access instantly, and it replaces stale partner file drops for any external data product.

Key Takeaways

  • Unity Catalog replaces per-workspace metastores with one governed metastore per region, making access auditable in a single place
  • Grant to Azure AD groups at catalog, schema, or table level; extend control with column masks and row filters
  • Automatic lineage turns incident response and compliance evidence into API queries instead of documentation projects
  • Delta Sharing distributes live data without copies, under the same grant model as internal access
  • Migration requires re-expressing ACLs as UC grants and converting storage mounts before the legacy metastore can be retired
🔒

Premium Content

Unity Catalog Governance: Grants, Lineage, and Delta Sharing

You've previewed the first section. Unlock this full lesson and 900+ advanced tutorials with a Premium plan.

đŸŽ¯End-to-end Projects
đŸ’ŧInterview Prep
📜Certificates
🤝Community Access

Already a member? Log in

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-13

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Advertisement