DESCRIBE SHARE

描述 共享 中包含的数据对象。

DESCRIBE 可以缩写为 DESC。

另请参阅:

DROP SHAREALTER SHARECREATE SHARESHOW SHARES

语法

提供商(出站共享)

DESC[RIBE] SHARE <name>
Copy

使用者(入站共享)

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

参数

name

指定要描述的出站共享的标识符。如果标识符包含空格或特殊字符,则整个字符串必须放在双引号内。放在双引号内的标识符也区分大小写。

provider_account.share_name

指定要描述的入站共享的完全限定标识符。

使用说明

  • 只有 ACCOUNTADMIN 角色才有权描述共享。使用除 ACCOUNTADMIN 之外的其他任何角色执行此命令都会返回错误信息。

  • 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.

    The output column names for this command are generated in lowercase. If you consume a result set from this command with the pipe operator or the RESULT_SCAN function, use double-quoted identifiers for the column names in the query to ensure that they match the column names in the output that was scanned. For example, if the name of an output column is type, then specify "type" for the identifier.

输出

  • 该命令的输出结果因您是提供商还是使用者而不同:

    • 对于提供商,共享中的对象名称以数据库名称为前缀。

    • 对于使用者,仅当在共享中创建数据库时,共享中对象的名称才会以数据库名称为前缀。如果尚未在共享中创建数据库,则对象前缀为 :code:` <DB> `

  • 输出中的 kind 列显示共享对象的类型。

示例

作为提供商,显示 sales_s 共享对象:

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

作为使用者,显示账户 ab67890 提供的 sales_s 共享对象:

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

在此示例中,使用者账户中尚未在 sales_s 共享中创建数据库。

语言: 中文