Skip to main content

METASTORE_PRIVILEGES

Applies to: check marked yes Databricks SQL check marked yes 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:

NameData typeNullableDescription
GRANTORSTRINGNoPrincipal that granted the privilege.
GRANTEESTRINGNoPrincipal to which the privilege is granted.
METASTORE_IDSTRINGNoMetastore on which the privilege is granted.
PRIVILEGE_TYPESTRINGNoPrivilege being granted.
IS_GRANTABLESTRINGNoAlways NO. Reserved for future use.
INHERITED_FROMSTRINGNoThe ancestor relation that the privilege is inherited from.

Constraints

The following constraints apply to the METASTORE_PRIVILEGES relation:

ClassNameColumn ListDescription
Primary keyMETPRIVS_PKGRANTOR, GRANTEE, METASTORE_ID, PRIVILEGE_TYPEUnique identifier for the granted privilege.
Foreign keyMETPRIVS_METS_FKMETASTORE_IDReferences METASTORES

Examples

SQL
> SELECT metastore_id, grantee
FROM information_schema.metastore_privileges;