DESCRIBE SHAREΒΆ
Describes the data objects that are included in a share.
DESCRIBE can be abbreviated to DESC.
- See also:
SyntaxΒΆ
Providers (outbound share)
DESC[RIBE] SHARE <name>
Consumers (inbound share)
DESC[RIBE] SHARE <provider_account>.<share_name>
ParametersΒΆ
nameSpecifies 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_nameSpecifies 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 pipe operator (
->>) or the RESULT_SCAN function. Both constructs treat the output as a result set that you can query.For example, you can use the pipe operator or RESULT_SCAN function to select specific columns from the SHOW command output or filter the rows.
When you refer to the output columns, use double-quoted identifiers for the column names. For example, to select the output column
type, specifySELECT "type".You must use double-quoted identifiers because the output column names for SHOW commands are in lowercase. The double quotes ensure that the column names in the SELECT list or WHERE clause match the column names in the SHOW command output that was scanned.
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
kindcolumn 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 | +----------+----------------------------------+---------------------------------+CopyIn this example, a database has not yet been created in the consumerβs account from the
sales_sshare.