Databricks DE · Topic 8.2

UC Access Control

GRANT/REVOKE privileges on securable objects to account groups — with the USE CATALOG → USE SCHEMA → SELECT chain and downward inheritance. This deep dive walks the model and the SQL.

GRANT / REVOKEUSE chaingrant to groupsMANAGE / ownership

The one-liner

GRANT <privilege> ON <securable> TO <group>. To read a table you need USE CATALOG + USE SCHEMA + SELECT. Privileges inherit downward (catalog → schema → table). Grant to groups, not users.
🪪 Analogy: an office with keycards — USE CATALOG badges into the building, USE SCHEMA onto the floor, SELECT into the room. You need all three — and you issue keycards to teams, not individuals.

The USE chain — toggle grants to open the door

▸ goal: read prod.sales.orders

USE CATALOG prodnot granted
USE SCHEMA prod.salesnot granted
SELECT ON prod.sales.ordersnot granted
🔒 permission denied

1 · The grant statement & the USE chain

GRANT <privilege> ON <securable> <name> TO <principal>. All three rungs are required to read a table. Grant to groups (synced via SCIM / identity federation).

GRANT USE CATALOG ON CATALOG prod              TO `analysts`;   -- badge: building
GRANT USE SCHEMA  ON SCHEMA  prod.sales        TO `analysts`;   -- badge: floor
GRANT SELECT      ON TABLE   prod.sales.orders TO `analysts`;   -- key: the room

2 · The privilege catalog

CategoryPrivileges
Read/write dataSELECT, MODIFY
TraverseUSE CATALOG, USE SCHEMA, USE CONNECTION
CreateCREATE TABLE, CREATE SCHEMA, CREATE VOLUME, CREATE FUNCTION, CREATE MATERIALIZED VIEW
Functions / filesEXECUTE, READ VOLUME, WRITE VOLUME
Discovery / governanceBROWSE, APPLY TAG
AdminMANAGE, ALL PRIVILEGES
GRANT EXECUTE     ON FUNCTION prod.sales.mask_email TO `analysts`;  -- UC function
GRANT READ VOLUME ON VOLUME   prod.sales.landing    TO `loaders`;   -- files
GRANT MODIFY      ON TABLE    prod.sales.orders     TO `data_eng`;  -- write

3 · Inheritance — click a level

▸ a grant at a level can cover children (grant once, not table-by-table)

CATALOG prod
SCHEMA prod.sales
TABLE prod.sales.orders
-- everyone in analysts reads ALL current & future tables in the schema
GRANT SELECT ON SCHEMA prod.sales TO `analysts`;   -- (+ USE CATALOG/USE SCHEMA)

4 · Ownership, MANAGE & SHOW GRANTS

ALTER TABLE prod.sales.orders OWNER TO `data_eng`;   -- transfer ownership (to a group)
GRANT MANAGE ON SCHEMA prod.sales TO `sales_admins`; -- delegate grant authority

SHOW GRANTS ON TABLE prod.sales.orders;              -- audit who can do what
REVOKE SELECT ON TABLE prod.sales.orders FROM `analysts`;

Who can grant: the object owner, holders of MANAGE, or metastore/account admins. Some actions (DROP/ALTER) require ownership.

Grant scope at a glance

Grant levelCoversUse when
Table/viewone objectfine-grained, exceptional access
Schemaall current + future objectsa team owns a subject area
Catalogeverything in the catalogbroad env/domain access

Why it matters

👥 Real-world use case: analytics gets USE CATALOG prod, USE SCHEMA prod.sales, SELECT ON SCHEMA prod.sales — granted to the analysts group, so onboarding/offboarding is just group membership.

Uses, edge cases & limitations

Common gotchas