Skip to main content

SHOW SHARES

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 10.4 LTS and above check marked yes Unity Catalog only

Lists the Delta Sharing shares that match an optionally supplied regular expression pattern. If no pattern is supplied then the command lists all the shares in the metastore.

To list the content of a share, use SHOW ALL IN SHARE.

Syntax

SHOW SHARES [ [ LIKE ] regex_pattern ]

Parameters

  • regex_pattern

    A regular expression pattern that is used to filter the results of the statement.

    • Except for * and | character, the pattern works like a regular expression.
    • * alone matches 0 or more characters and | is used to separate multiple different regular expressions, any of which can match.
    • The leading and trailing blanks are trimmed in the input pattern before processing. The pattern match is case-insensitive.

Examples

SQL
> CREATE SHARE vaccine COMMENT 'vaccine data to publish';
> CREATE SHARE meds COMMENT 'meds data to publish';
> SHOW SHARES;
name created_at created_by comment
--------- ---------------------------- -------------------------- -----------------------
vaccine 2022-01-01T00:00:00.000+0000 alwaysworks@databricks.com vaccine data to publish
meds 2022-01-01T00:00:01.000+0000 alwaysworks@databricks.com meds data to publish

> SHOW SHARES LIKE 'vaccine';
name created_at created_by comment
--------- ---------------------------- -------------------------- -----------------------
vaccine 2022-01-01T00:00:00.000+0000 alwaysworks@databricks.com vaccine data to publish

> SHOW SHARES IN PROVIDER some_provider;
name created_at created_by comment
--------- ---------------------------- -------------------------- -----------------------
vaccine 2022-01-01T00:00:00.000+0000 alwaysworks@databricks.com vaccine data to publish