ROUTINE_PRIVILEGES

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 11.1 and above

Preview

This feature is in Public Preview.

INFORMATION_SCHEMA.ROUTINE_PRIVILEGES lists principals that have privileges on the routines in the catalog.

The rows returned are limited to the routines the user is privileged to interact with.

Definition

The ROUTINE_PRIVILEGES relation contains the following columns:

Name

Data type

Nullable

Standard

Description

GRANTOR

STRING

No

Yes

Principal who granted the privilege.

GRANTEE

STRING

No

Yes

Principal to whom the privilege has been granted.

SPECIFIC_CATALOG

STRING

No

Yes

Catalog of routine on which privilege has been granted.

SPECIFIC_SCHEMA

STRING

No

Yes

Database of routine on which privilege has been granted.

SPECIFIC_NAME

STRING

No

Yes

Schema unique (specific) name of routine on which privilege has been granted.

ROUTINE_CATALOG

STRING

No

Yes

Matches SPECIFIC_CATALOG.

ROUTNE_SCHEMA

STRING

No

Yes

Matches SPECIFIC_SCHEMA.

ROUTINE_NAME

STRING

No

Yes

Name of routine on which privilege has been granted.

PRIVILEGE_TYPE

STRING

No

Yes

Privilege being granted.

IS_GRANTABLE

STRING

No

Yes

Always NO. Reserved for future use.

Constraints

The following constraints apply to the ROUTINE_PRIVILEGES relation:

Class

Name

Column List

Description

Primary key

ROUTINE_PRIVS_PK

GRANTOR, GRANTEE, SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME, PRIVILEGE_TYPE

Uniquely identifies the privilege granted.

Foreign key

ROUTINE_PRIVS_ROUTINE_FK

SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME

References ROUTINES

Examples

> SELECT specific_catalog, specific_schema, specific_name, grantee
    FROM information_schema.routine_privileges;