SHOW SHARES (Databricks SQL)

Preview

Delta Sharing is in Public Preview. To participate in the preview, you must enable the External Data Sharing feature group in the Databricks Account Console. See Enable the External Data Sharing feature group for your account.

Delta Sharing is subject to applicable terms. Enabling the External Data Sharing feature group represents acceptance of those terms.

Lists the 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

> 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