SCHEMA_SHARE_USAGE
Applies to: Databricks SQL 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:
Name | Data type | Nullable | Description |
---|---|---|---|
CATALOG_NAME |
STRING |
No | Catalog of the schema in the share. |
SCHEMA_NAME |
STRING |
No | Schema in the share. |
SHARE_NAME |
STRING |
No | Name of the share. |
SHARED_AS_SCHEMA |
STRING |
No | Alias of the shared schema. |
COMMENT |
STRING |
Yes | An optional comment that describes the schema share usage. |
Constraints
The following constraints apply to the SCHEMA_SHARE_USAGE
relation:
Class | Name | Column List | Description |
---|---|---|---|
Primary key | SCHEMA_SHARE_USAGE_PK |
SHARE_NAME , SHARED_AS_SCHEMA |
Unique identifier for the table share usage. |
Foreign key | SCHEMA_SHARE_USAGE_SCHEMATA_FK |
CATALOG_NAME , SCHEMA_NAME |
References SCHEMATA |
Foreign key | SCHEMA_SHARE_USAGE_SHARES_FK |
SHARE_NAME |
References SHARES |
Examples
> SELECT share_name, catalog_name, schema_name
FROM information_schema.schema_share_usage;