Categories:

System functions (System Information)

SYSTEM$GET_COMPUTE_POOL_PENDING_MAINTENANCE

Retrieves information about pending Snowflake maintenance actions for compute pools in the current account.

See also:

Snowpark Container Services: Working with compute pools

语法

SYSTEM$GET_COMPUTE_POOL_PENDING_MAINTENANCE()

返回

  • 返回 JSON 对象,该对象提供是否需要维护的指示以及即将到来的维护时段时间轴。JSON 字段为:

    • maintenanceRequired. Boolean field that provides an indication of whether maintenance is required.
    • start. Start time of the maintenance window.
    • end. End time of the maintenance window.
  • 如果 Snowflake 账户中没有正在运行的计算池,则该函数返回“No running Snowpark Container Services found”。

  • 如果没有计划的维护时段,则该函数返回“No pending maintenance actions”。

使用说明

  • 所有角色都有权访问此函数。

示例

SELECT SYSTEM$GET_COMPUTE_POOL_PENDING_MAINTENANCE();

示例输出:

+---------------------------------------------------------------------------------------------------------+
| SYSTEM$GET_COMPUTE_POOL_PENDING_MAINTENANCE()                                                           |
%---------------------------------------------------------------------------------------------------------%
| {"maintenanceRequired":false,"maintenanceWindow":{"start":"2025-02-27T23:00","end":"2025-02-28T00:00"}} |
+---------------------------------------------------------------------------------------------------------+

This output indicates that no maintenance is scheduled for the next maintenance window. If maintenance is required, maintenanceRequired is set to true.