METASTORE_PRIVILEGES
Applies to: Databricks SQL
Databricks Runtime 10.4 LTS and above
INFORMATION_SCHEMA.METASTORE_PRIVILEGES lists principals that have privileges on the current metastore.
This is an extension to the SQL Standard Information Schema.
Definition
The METASTORE_PRIVILEGES
relation contains the following columns:
Name | Data type | Nullable | Description |
---|---|---|---|
|
| No | Principal that granted the privilege. |
|
| No | Principal to which the privilege is granted. |
|
| No | Metastore on which the privilege is granted. |
|
| No | Privilege being granted. |
|
| No | Always |
|
| No | The ancestor relation that the privilege is inherited from. |
Constraints
The following constraints apply to the METASTORE_PRIVILEGES
relation:
Class | Name | Column List | Description |
---|---|---|---|
Primary key |
|
| Unique identifier for the granted privilege. |
Foreign key |
|
| References METASTORES |
Examples
> SELECT metastore_id, grantee
FROM information_schema.metastore_privileges;