DESCRIBE PIPE

描述为管道指定的属性以及属性的默认值。

DESCRIBE 可以缩写为 DESC。

另请参阅:

DROP PIPEALTER PIPECREATE PIPESHOW PIPES

语法

DESC[RIBE] PIPE <name>
Copy

参数

name

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

使用说明

  • 仅返回以下角色的结果:(即对管道具有 OWNERSHIP 权限的角色)、对管道具有 MONITOR 或 OPERATE 权限的角色,或者 具有全局 MONITOR EXECUTION 权限的角色。

  • 要确定管道的当前状态,请查询 SYSTEM$PIPE_STATUS 函数。

  • 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, specify SELECT "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.

输出

命令输出在以下列中提供管道属性和元数据:

| created_on | name | database_name | schema_name | definition | owner | notification_channel | comment | integration | pattern | error_integration | invalid_reason | kind |
Copy

描述

created_on

创建管道的日期和时间。

name

The name of the pipe object.

Manually created pipes: This is the name defined in the CREATE PIPE statement.

Default pipe (Snowpipe Streaming high-performance): The value is derived from the target table name; for example, MY_TABLE-STREAMING.

database_name

The name of the database that contains the Snowpipe object.

Manually created pipe: The name of the database that the pipe object belongs to.

Default pipe (Snowpipe Streaming high-performance): The name of the target table's database.

schema_name

The name of the schema that contains the Snowpipe object.

Manually created pipe: The name of the schema that the pipe object belongs to.

Default pipe: The name of the target table's schema.

definition

COPY statement that is used to load data from queued files into a Snowflake table.

owner

The name of the role that possesses the OWNERSHIP privilege on the pipe object.

Named pipe: The name of the role that owns the pipe, which is the role specified in the CREATE PIPE statement or granted ownership later.

Default pipe (Snowpipe Streaming high-performance): This column displays NULL.

notification_channel

Amazon Resource Name of the Amazon SQS queue for the stage that is named in the DEFINITION column.

comment

A user-provided or system-generated text string that describes the pipe object.

Named pipe: The user-defined comment that is provided during the CREATE PIPE statement.

Default pipe (Snowpipe Streaming High-Performance): A system-generated string that is always the following sentences: "Default pipe for Snowpipe Streaming High Performance ingestion to a table. Created and managed by Snowflake."

integration

依赖通知事件从 Google Cloud Storage 或 Microsoft Azure 云存储触发数据加载的管道的通知集成名称。

pattern

管道定义中的 COPY INTO <table> 语句中的 PATTERN 复制选项值(如果指定了复制选项)。

error_integration

依赖于 Amazon S3 云存储中的错误事件来触发通知的管道的通知集成名称。

invalid_reason

显示可能存在问题的管道的一些详细信息。您可以使用提供的信息更有效地对管道和 :doc:` SYSTEM$PIPE_STATUS </sql-reference/functions/system_pipe_status>` 进行故障排除。如果管道没有问题,则值为 NULL。

kind

管道的种类,即 STAGE。

Kafka 相关列

描述

broker_integration

与 Kafka 结合使用的外部访问集成的名称。

broker_secret

与 Kafka 结合使用的密钥的名称。

row_format

记录的行格式:JSONAVRO

schema

表示为变体的记录架构。

topic

同步主题的名称。

示例

描述在 CREATE PIPE 中的示例中创建的 mypipe 管道:

desc pipe mypipe;

+-------------------------------+--------+---------------+-------------+---------------------------------+----------+---------+
| created_on                    | name   | database_name | schema_name | definition                      | owner    | comment |
|-------------------------------+--------+---------------+-------------+---------------------------------+----------+---------|
| 2017-08-15 06:11:05.703 -0700 | MYPIPE | MYDATABASE    | PUBLIC      | copy into mytable from @mystage | SYSADMIN |         |
+-------------------------------+--------+---------------+-------------+---------------------------------+----------+---------+
Copy
语言: 中文