DESCRIBE SHARE¶

Describes the data objects that are included in a share.

DESCRIBE can be abbreviated to DESC.

See also:

DROP SHARE , ALTER SHARE , CREATE SHARE , SHOW SHARES

Syntax¶

Providers (outbound share)

DESC[RIBE] SHARE <name>
Copy

Consumers (inbound share)

DESC[RIBE] SHARE <provider_account>.<share_name>
Copy

Parameters¶

name

Specifies the identifier for the outbound share to describe. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

provider_account.share_name

Specifies the fully-qualified identifier for the inbound share to describe.

Usage notes¶

  • Only the ACCOUNTADMIN role has the privileges to describe a share. Executing this command with any role other than ACCOUNTADMIN returns an error.

  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

Output¶

  • The output of the command is different depending on whether you are a provider or consumer:

    • For providers, the names of the objects in the share are prefixed with the database name.

    • For consumers, the names of the objects in the share are prefixed with a database name only if a database has been created from the share. If a database has not been created from the share, the objects are prefixed with <DB>.

  • The kind column in the output displays the type of the objects in the share.

Examples¶

As a provider, display the objects in the sales_s share:

DESC SHARE sales_s;

+----------+--------------------------------------+-------------------------------+
| kind     | name                                 | shared_on                     |
|----------+--------------------------------------+-------------------------------|
| DATABASE | SALES_DB                             | 2017-06-15 17:03:16.642 -0700 |
| SCHEMA   | SALES_DB.AGGREGATES_EULA             | 2017-06-15 17:03:16.790 -0700 |
| TABLE    | SALES_DB.AGGREGATES_EULA.AGGREGATE_1 | 2017-06-15 17:03:16.963 -0700 |
+----------+--------------------------------------+-------------------------------+
Copy

As a consumer, display the objects in the sales_s share provided by account ab67890:

DESC SHARE ab67890.sales_s;

+----------+----------------------------------+---------------------------------+
| kind     | name                             | shared_on                       |
|----------+----------------------------------+---------------------------------|
| DATABASE | <DB>                             | Thu, 15 Jun 2017 17:03:16 -0700 |
| SCHEMA   | <DB>.AGGREGATES_EULA             | Thu, 15 Jun 2017 17:03:16 -0700 |
| TABLE    | <DB>.AGGREGATES_EULA.AGGREGATE_1 | Thu, 15 Jun 2017 17:03:16 -0700 |
+----------+----------------------------------+---------------------------------+
Copy

In this example, a database has not yet been created in the consumer’s account from the sales_s share.