暂停或恢复动态表
本主题讨论动态表自动暂停的原因以及如何手动暂停或恢复动态表。
Suspended dynamic tables aren’t automatically refreshed; you can manually refresh them.
自动动态表暂停
动态表将在连续 5 次计划刷新错误后自动暂停。成功刷新(包括手动刷新)会将错误计数重置为 0。例如,如果表连续两次计划刷新失败,然后在下一次刷新中成功,则错误计数将重置为 0。
手动触发的刷新产生的错误不计入此限制。
任何依赖于已暂停表的动态表也将被暂停。
您可以使用以下选项之一查看动态表的当前状态(ACTIVE 或 SUSPENDED):
Execute the DYNAMIC_TABLE_GRAPH_HISTORY table function:
In the output, the SCHEDULING_STATE column shows the state of your dynamic table (ACTIVE or SUSPENDED):
To view the state of your dynamic tables, sign in to Snowsight. In the navigation menu, select Transformation » Dynamic tables.
您可以在此页面上查看动态表的状态和上次刷新状态。您还可以按数据库或架构进行筛选以缩小结果范围。
手动暂停动态表
当您暂时不需要某个动态表时,可以手动将其暂停,以避免产生刷新成本。不必将其删除,可保留以供将来使用。暂停操作还可以帮助您更好地控制刷新频率,例如,当发生跳过操作时,您可能需要一些时间进行故障排除。
如果您希望确保在特定时间或特定事件发生时进行刷新,可以使用任务或定期运行的脚本来执行手动刷新,因为动态表无法保证精确的刷新时间。这样,您可以精确控制表的刷新。
您可以使用 ALTER DYNAMIC TABLE … SUSPEND 命令或 Snowsight 手动暂停动态表,但存在以下限制:
- Suspending a dynamic table also suspends the dynamic tables that are downstream from it.
- Suspending a dynamic table with incremental refresh beyond the Time Travel retention period of its base tables will cause it to fail on the next refresh after the dynamic table resumes.
- Sign in to Snowsight.
- In the navigation menu, select Transformation » Dynamic tables.
- Find your dynamic table in the list and then select
» Suspend. - 在弹出窗口中,确认要暂停的动态表。
恢复动态表
To resume your dynamic tables, use either the ALTER DYNAMIC TABLE … RESUME command or Snowsight.
- Sign in to Snowsight.
- In the navigation menu, select Transformation » Dynamic tables.
- Find your dynamic table in the list and then select
» Resume. - 在弹出窗口中,确认要恢复的动态表。