SHOW RELEASE DIRECTIVES

Lists the release directives defined for an application package.

输出返回应用程序包中发布指令的元数据和属性,根据名称按字典顺序排序。如果您要使用提供的筛选器筛选结果,请务必注意这一点。

另请参阅:

ALTER APPLICATION PACKAGECREATE APPLICATION PACKAGEDROP APPLICATION PACKAGESHOW APPLICATION PACKAGES

语法

SHOW RELEASE DIRECTIVES [ LIKE '<pattern>' ]
  IN APPLICATION PACKAGE <name>
  [ FOR RELEASE CHANNEL <release_channel> ]
Copy

参数

name

指定应用程序包的标识符。

LIKE 'pattern'

(可选)按应用程序包中指定的版本名称筛选命令输出。筛选器使用 不区分大小写 的模式匹配,并支持 SQL 通配符(%_)。

例如,以下模式返回 相同的 结果:

... LIKE '%v1%' ...
... LIKE '%V1%' ...

. 默认:无值(不对输出应用筛选)。

FOR RELEASE CHANNEL release_channel

Returns only the release directives defined for the specified release channels.

输出

命令输出在以下列中提供发布指令的属性和元数据:

描述

name

指定发布指令的名称。对于默认的发布指令,名称为 DEFAULT

target_type

Specifies the type of target for the directive. The following values are possible:

  • DEFAULT

  • ACCOUNT

target_name

指定组织或账户的名称。默认发布指令的值始终为 NULL

created_on

指定创建发布指令时的时间戳。

version

Specifies the application version literal if applicable; if not, the value is NULL.

patch

Specifies the patch number of the application version if applicable; if not, the value is NULL.

modified_on

指定上次修改发布指令时的时间戳;如果尚未修改,则指定 NULL。

active_regions

指定允许发布指令影响升级的 Snowflake 区域列表。RELEASE_STATUSHOLDING 时会忽略此值。

pending_regions

Specifies the list of Snowflake regions where the release directive will be applied in the future. Upgrade progress in active regions is monitored for a period before new regions are activated.

release_status

Specifies the current release status. The following values are possible:

  • IN_PROGRESS:正在对所列出的 ACTIVE_REGIONS 进行升级。

  • HOLDING:升级暂时停止。

  • DEPLOYED:在安装应用程序的所有区域均允许升级。

deployed_on

指定发布指令的部署时间和日期。如果在部署期间有过多目标区域被标识为运行状况不佳,发布指令会临时移动至 HOLDING

release_channel

Specifies the release channel the release directive belongs to.

使用说明

  • This command requires the OWNERSHIP privilege, the MANAGE RELEASES privilege, or the MANAGE VERSIONS privilege on the application package.

  • 该命令返回与授予执行此命令的角色的权限匹配的发布指令的结果。

  • 该命令不需要正在运行的仓库即可执行。

  • 该命令仅返回当前用户的当前角色已获授至少一项访问权限的对象。

  • MANAGE GRANTS 访问权限隐式允许其持有者查看账户中的每个对象。默认情况下,只有账户管理员(具有 ACCOUNTADMIN 角色的用户)和安全管理员(具有 SECURITYADMIN 角色的用户)才具有 MANAGE GRANTS 权限。

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

示例

SHOW RELEASE DIRECTIVES IN APPLICATION PACKAGE hello_snowflake_package;
Copy
+---------+-------------+---------------------------------+-------------------------------+---------+-------+-------------------------------+------------------------+--------------------------+----------------+-------------------------------+
| name    | target_type | target_name                     | created_on                    | version | patch | modified_on                   | active_regions         | pending_regions          | release_status | deployed_on                   |
|---------+-------------+---------------------------------+-------------------------------+---------+-------+-------------------------------+------------------------+--------------------------+----------------+-------------------------------+
| DEFAULT | DEFAULT     | NULL                            | 2023-04-02 14:55:17.304 -0700 | V2      |     0 | 2023-04-02 15:47:08.673 -0700 | PUBLIC.AWS_AP_SOUTH_1  | PUBLIC.AWS_AP_SOUTH_1    | IN PROGRESS    |                               |
| NEW_RD  | ACCOUNT     | [PROVIDER_DEV.PROVIDER_AWS]     | 2023-04-02 16:30:44.443 -0700 | V1      |     1 | 2023-04-03 07:10:42.428 -0700 | ALL                    |                          | DEPLOYED       | 2023-04-03 07:10:42.428 -0700 |         |
+---------+-------------+---------------------------------+-------------------------------+---------+-------+-------------------------------+------------------------+--------------------------+----------------+-------------------------------+
语言: 中文