What you will be able to do
- Place metastore, catalog, schema and table in the Unity Catalog securable hierarchy and say which ones are containers
- Work out the full set of grants a principal needs to read, write or create objects, including USE CATALOG and USE SCHEMA
- Predict how a grant on a catalog or schema reaches current and future child objects
- Name users, service principals and groups correctly in SQL, including when backticks are required
- Say what ALL PRIVILEGES does and does not cover
Key concept
Securable hierarchy — Unity Catalog arranges data as metastore, then catalog, then schema, then table (and other objects), and you can grant privileges on every level. A privilege granted on a container flows down to its children, but a principal still needs a usage privilege on each parent before it can reach anything below.
1.The hierarchy you grant against
In Unity Catalog, access control is the act of granting privileges on securable objects to principals. The top-level container is the metastore. Inside it, data uses a three-level namespace: catalog.schema.table. Securables run from the metastore at the top, through catalogs and schemas, down to the data objects they hold: tables, views, volumes, functions and models.
Two levels are container objects. Catalogs hold schemas, and schemas hold tables, views, volumes and functions. Containers get special treatment in four ways. Grants on them can be inherited. They need usage privileges. Their owners can manage the child objects. They also take creation privileges such as CREATE SCHEMA on a catalog and CREATE TABLE on a schema. Tables, views, volumes and functions are non-containers because nothing sits beneath them.
The starting point is that nobody has access to anything. Users initially have no access to data in a metastore, and a principal must be explicitly granted a privilege to perform an action. Each privilege also belongs to particular levels. A table accepts SELECT, MODIFY, APPLY TAG, MANAGE and a few others. A catalog accepts USE CATALOG, CREATE SCHEMA and BROWSE, plus any privilege meant for objects inside it.
Checkpoint 1 of 6· Check yourself
Which of these Unity Catalog securables is a container object that holds tables, views, volumes and functions as direct children?
Schemas are the middle level of the namespace and contain tables, views, volumes and functions. Tables, views and functions are non-containers.
“Schemas contain tables, views, volumes, and functions as direct children.”Source: docs.databricks.com
2.Usage privileges: the three grants behind every read
USE CATALOG and USE SCHEMA are usage privileges. Neither one gives access to data. They are the prerequisite for doing anything inside a catalog or schema. For most operations on a table, view, volume or function, a principal needs three things: USE CATALOG on the parent catalog, USE SCHEMA on the parent schema, and the privilege for the operation itself (SELECT, MODIFY, EXECUTE and so on). It needs all three.
This gives higher-level administrators a gate. A table owner may want to share a table, but other users still cannot reach it without the usage privileges on its parents. Only catalog and schema owners, or users with MANAGE, can grant those, so a table owner cannot hand out access beyond the approved boundary.
| Operation | Required privileges |
|---|---|
| Read data from a table or view | USE CATALOG on catalog, USE SCHEMA on schema, SELECT on table or view |
| Write data to a table | USE CATALOG on catalog, USE SCHEMA on schema, MODIFY on table |
| Create a schema in a catalog | USE CATALOG on catalog, CREATE SCHEMA on catalog |
| Create a table in a schema | USE CATALOG on catalog, USE SCHEMA on schema, CREATE TABLE on schema (or catalog if granted at catalog-level) |
| Execute a function | USE CATALOG on catalog, USE SCHEMA on schema, EXECUTE on function |
| Manage a catalog (grant privileges, transfer ownership, drop) | MANAGE on catalog (no usage privileges required) |
The last row shows the one exception. MANAGE has reduced usage requirements: you need usage privileges only on the containers strictly above the level where you hold MANAGE. That relief covers metadata management only. With MANAGE, SELECT and MODIFY still need USE CATALOG and USE SCHEMA.
Checkpoint 2 of 6· Exam question
A data engineer grants `SELECT` on the table `main.sales.orders` to a user, but the user's query still fails with a permission error. What additional grants are most likely required?
Correct answer: A — Grant `USE CATALOG` on the catalog and `USE SCHEMA` on the schema, since traversing into a namespace requires these usage privileges in addition to `SELECT` on the table.
- A. Correct. Reading a table requires `USE CATALOG` on its catalog and `USE SCHEMA` on its schema in addition to `SELECT` on the table, since these container privileges let a principal traverse into the namespace.
- B. Incorrect. `MODIFY` controls insert, update, and delete operations, not read access, and `SELECT` already grants the ability to query rows once the containing catalog and schema are reachable.
- C. Incorrect. Granting `ALL PRIVILEGES` at the metastore level is far broader than needed and is not the standard fix for a missing container-level grant on one table.
- D. Incorrect. Who issues a `GRANT` statement does not change whether the privilege takes effect; the failure here is a missing `USE CATALOG`/`USE SCHEMA` grant, not the identity of the grantor.
Sources1
3.Inheritance: granting high in the tree
Inheritance is why you pick the level of a grant on purpose. SELECT on a catalog lets the grantee read every table in it, provided the usage privileges are also in place. The privileges reference makes the same point for each container: catalog-level and schema-level grants of object privileges apply to current and future objects. If you grant at the schema level instead, the grant reaches only that schema.
The metastore works differently. Most metastore-level privileges, such as CREATE CATALOG or CREATE EXTERNAL LOCATION, are not inherited at all. READ METADATA is the exception: granted on the metastore, it inherits down to every object.
If MANAGE is granted on a container, the user also gets MANAGE on all child objects. One more nuance concerns composite privileges. MANAGE and MODIFY have child privileges (READ METADATA; INSERT, UPDATE, DELETE), and composites and children are granted and revoked independently.
Checkpoint 3 of 6· Check yourself
A metastore admin grants CREATE CATALOG and READ METADATA on the metastore to a governance group. Which of these grants inherits down to the objects inside the metastore?
At the metastore level, READ METADATA is the only privilege that inherits. The other metastore privileges do not follow inheritance.
“When granted on the metastore, READ METADATA inherits down to all objects in the metastore.”Source: docs.databricks.com
4.Principals: users, service principals and groups
A principal is a user, service principal or group that the metastore knows about. Each kind is written differently in SQL:
- A user is identified by email address. Because of the @, it must always be in backticks.
- A service principal is identified by its applicationId, not by a display name. The ID contains dashes, so it also needs backticks.
- A group is written by name. It needs backticks only if the name contains special characters. A name such as finance-team needs them, while finance_team does not, because underscores are not special.
The backtick rule applies to more than principals. Any object name with a hyphen needs backticks too, so a schema named sales-eu has to be written as ` sales-eu `.
-- Granting a privilege to the user alf@melmak.et
> GRANT SELECT ON TABLE t TO `alf@melmak.et`;
-- Granting a privilege to the service principal fab9e00e-ca35-11ec-9d64-0242ac120002
> GRANT SELECT ON TABLE t TO `fab9e00e-ca35-11ec-9d64-0242ac120002`;
-- Revoking a privilege from the general public group.
> REVOKE SELECT ON TABLE t FROM `account users`;Group type matters. Account groups can receive privileges on Unity Catalog securables. Workspace-local groups cannot, and that includes the system groups users and admins. To grant something to everyone, use ` account users `, the root group that contains every user in the account. It needs backticks because of the space.
Checkpoint 4 of 6· Match them up
Match each principal reference to the correct way of writing it in a GRANT
Tap a term, then the definition that fits it.
Backticks are needed for @, dashes and spaces but not for underscores. Service principals are referenced by applicationId.
“Any object name that includes special characters, such as hyphens or dashes (-), must be surrounded by backticks (` `).”Source: docs.databricks.com
Sources2
5.ALL PRIVILEGES and what it leaves out
GRANT ALL PRIVILEGES ON TABLE forecasts TO finance reads as if it gives everything, but it does not. In Unity Catalog, ALL PRIVILEGES is evaluated when permissions are checked. It is not a one-time expansion into separate grants. On a table it implies SELECT, MODIFY and APPLY TAG.
It deliberately excludes MANAGE, READ METADATA, EXTERNAL USE SCHEMA and EXTERNAL USE LOCATION. The documentation says the exclusion is there to avoid accidental data exfiltration or privilege escalation. So a principal with ALL PRIVILEGES on a schema still cannot manage that schema's grants unless it also holds MANAGE or ownership.
Checkpoint 5 of 6· Check yourself
A group has ALL PRIVILEGES on a catalog. Which privilege does it still lack?
ALL PRIVILEGES covers the catalog-level privileges but excludes MANAGE, READ METADATA and the two EXTERNAL USE privileges.
“ALL PRIVILEGES does not include the EXTERNAL USE SCHEMA, EXTERNAL USE LOCATION, MANAGE, or READ METADATA privileges.”Source: docs.databricks.com
Sources4
6.DENY, and ABAC DENY policies
DENY is the counterpart of GRANT. Denying a privilege takes precedence over any explicit or implicit grant, and a deny on a schema or catalog implicitly denies that privilege on the objects below it. You undo a DENY by running REVOKE for the same privilege. Be careful about scope, though: the SQL DENY statement is documented as not supported by Unity Catalog and applies only to the hive_metastore catalog and its objects.
In Unity Catalog the equivalent is the ABAC DENY policy (Beta). It is a separate mechanism from row filters and column masks. A DENY policy is attached at the metastore, catalog or schema level, matches securables by their governed tags, and denies a privilege to the principals it targets. Today the only privilege it can deny is MANAGE ACCESS CONTROL, a child of MANAGE that can be denied but not granted. Row filter and column mask policies are different: they restrict the content of data a user can already access, and they need a user-defined function, while DENY policies do not.
Checkpoint 6 of 6· Exam question
Which statement correctly describes the `DENY` privilege statement in Unity Catalog?
Correct answer: A — Unity Catalog does not support a `DENY` SQL statement for its securables; administrators remove access with `REVOKE`, or use ABAC deny policies to restrict matching rows or columns instead.
- A. Correct. Unity Catalog securables do not accept a `DENY` statement; that syntax is only available for the legacy `hive_metastore` catalog, so access removal on Unity Catalog objects goes through `REVOKE` or attribute-based ABAC deny policies.
- B. Incorrect. `DENY` is a `hive_metastore`-only statement and is not implemented on Unity Catalog securables at all, so it cannot block grants there.
- C. Incorrect. This describes neither Unity Catalog's actual behavior, which lacks `DENY` entirely, nor `hive_metastore`'s `DENY`, which does cascade from a schema or catalog down to its contained objects.
- D. Incorrect. There is no recency-based conflict resolution between `DENY` and `GRANT` on Unity Catalog objects, because `DENY` is not a Unity Catalog statement in the first place.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Granting SELECT on a table is enough for a user to query it.Why is that wrong?
The user also needs USE CATALOG on the parent catalog and USE SCHEMA on the parent schema.
Covered in Usage privileges: the three grants behind every read
2.Granting to the workspace
usersgroup is a quick way to give everyone Unity Catalog access.Why is that wrong?usersis a workspace-local group and cannot receive privileges on Unity Catalog securables. Use the account groupaccount usersinstead.3.ALL PRIVILEGES makes the grantee able to manage permissions on the object.Why is that wrong?
ALL PRIVILEGES excludes MANAGE, so it does not give the right to manage grants.
Covered in ALL PRIVILEGES and what it leaves out
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://docs.databricks.com/aws/en/data-governance/unity-catalog/access-control/permissions-conceptsOfficial docs
“A user or group must be explicitly granted a privilege to perform an action.”
↩︎ The hierarchy you grant against“Usage privileges provide an important access control mechanism for higher-level administrators.”
↩︎ Usage privileges: the three grants behind every read“Composite and child privileges are granted and revoked independently.”
↩︎ Inheritance: granting high in the tree“Every object in this hierarchy is a securable object.”
↩︎ Key concept“Having only the SELECT privilege on a table is not sufficient to read it”
↩︎ Exam trap 1“Schemas contain tables, views, volumes, and functions as direct children.”
↩︎ Checkpoint“When you grant a privilege on a container object, that privilege automatically applies to all current and future child objects.”
↩︎ Prediction“ALL PRIVILEGES does not include the EXTERNAL USE SCHEMA, EXTERNAL USE LOCATION, MANAGE, or READ METADATA privileges.”
↩︎ Checkpoint - 2.
“Initially, users have no access to data in a metastore.”
↩︎ The hierarchy you grant against“service principal (represented by its applicationId value)”
↩︎ Principals: users, service principals and groups - 3.https://docs.databricks.com/aws/en/data-governance/unity-catalog/access-control/privileges-referenceOfficial docs
“This is unlike other metastore-level privileges, which don't follow privilege inheritance.”
↩︎ Inheritance: granting high in the tree“When granted on the metastore, READ METADATA inherits down to all objects in the metastore.”
↩︎ Checkpoint - 4.
“ALL PRIVILEGES expands to all available privileges at the time permissions checks are made.”
↩︎ ALL PRIVILEGES and what it leaves out“ALL PRIVILEGES does not include the EXTERNAL USE SCHEMA, EXTERNAL USE LOCATION, MANAGE, or READ METADATA privileges.”
↩︎ Exam trap 3 - 5.
“Denying a privilege takes precedent over any explicit or implicit grant.”
↩︎ DENY, and ABAC DENY policies - 6.
“DENY policies are attached at the metastore, catalog, or schema level and deny the MANAGE ACCESS CONTROL privilege”
↩︎ DENY, and ABAC DENY policies“Row filter and column mask policies restrict the content of data a user can already access.”
↩︎ DENY, and ABAC DENY policies
Also cited
“You cannot grant users privileges on securable objects in Unity Catalog because it is a workspace-local group.”
↩︎ Exam trap 2“Any object name that includes special characters, such as hyphens or dashes (-), must be surrounded by backticks (` `).”
↩︎ Checkpoint