Skip to main content

SCHEMA_SHARE_USAGE

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 13.3 LTS and above

INFORMATION_SCHEMA.SCHEMA_SHARE_USAGE lists schemas that belong to shares. For more information, see schemas and shares.

Information is displayed only for shares the user has permission to interact with.

This is an extension to the SQL Standard Information Schema.

Definition

The SCHEMA_SHARE_USAGE relation contains the following columns:

NameData typeNullableDescription
CATALOG_NAMESTRINGNoCatalog of the schema in the share.
SCHEMA_NAMESTRINGNoSchema in the share.
SHARE_NAMESTRINGNoName of the share.
SHARED_AS_SCHEMASTRINGNoAlias of the shared schema.
COMMENTSTRINGYesAn optional comment that describes the schema share usage.

Constraints

The following constraints apply to the SCHEMA_SHARE_USAGE relation:

ClassNameColumn ListDescription
Primary keySCHEMA_SHARE_USAGE_PKSHARE_NAME, SHARED_AS_SCHEMAUnique identifier for the table share usage.
Foreign keySCHEMA_SHARE_USAGE_SCHEMATA_FKCATALOG_NAME, SCHEMA_NAMEReferences SCHEMATA
Foreign keySCHEMA_SHARE_USAGE_SHARES_FKSHARE_NAMEReferences SHARES

Examples

SQL
> SELECT share_name, catalog_name, schema_name
FROM information_schema.schema_share_usage;