SCHEMA_PRIVILEGES
Applies to: Databricks SQL
Databricks Runtime 10.4 LTS and above
Unity Catalog only
INFORMATION_SCHEMA.SCHEMA_PRIVILEGES lists principals that have privileges on a schema in a catalog.
The rows returned are limited to the schemas the user is privileged to interact with.
Definition
The SCHEMA_PRIVILEGES relation contains the following columns:
Name | Data type | Nullable | Standard | Description |
|---|---|---|---|---|
|
| No | Yes | Principal that granted the privilege. |
|
| No | Yes | Principal to which the privilege is granted. |
|
| No | Yes | Catalog of schema on which the privilege is granted. |
|
| No | Yes | Schema on which the privilege is granted. |
|
| No | Yes | Privilege being granted. |
|
| No | Yes | Always |
|
| Yes | No | The ancestor relation that the privilege is inherited from. |
Constraints
The following constraints apply to the SCHEMA_PRIVILEGES relation:
Class | Name | Column List | Description |
|---|---|---|---|
Primary key |
|
| Unique identifier for the granted privilege. |
Foreign key |
|
| References SCHEMATA |
Examples
> SELECT catalog_name, schema_name, grantee
FROM information_schema.schema_privileges;