Skip to content
Lucas Lessa
Voltar para as notícias
SnowflakeGAImpacto: Médio

Predict dynamic table refresh behavior with EXPLAIN CHANGES

Use EXPLAIN CHANGES to predict whether a dynamic table's next refresh will be incremental or require reinitialization without applying changes.

O que mudou

The EXPLAIN CHANGES command allows you to simulate the behavior of a dynamic table's next refresh. You can use it before running a manual refresh or before applying DDL changes, identifying whether the operation will run incrementally or require full reinitialization.### Use casesImagine you need to change the target lag of a production dynamic table and want to know if that change will trigger a full data reload. With this feature you can:- Predict whether the next refresh will be incremental or full.- Validate the impact of DDL changes before applying them.- Identify if a specific change will cause refresh failures.### How to useTo test the impact of a DDL change without applying it, prefix the statement with EXPLAIN CHANGES:sqlEXPLAIN CHANGES ALTER DYNAMIC TABLE dt_orders SET TARGET_LAG = '5 minutes';What happens in this code:1. Snowflake analyzes the DDL statement and the current table state.2. The change is not applied to the actual table.3. The system returns metadata indicating the predicted effect for the refresh, including whether the action will be incremental.To check the reason for a full reinitialization when removing a frozen region:sqlEXPLAIN CHANGES ALTER DYNAMIC TABLE dt_orders UNSET FROZEN WHERE;What happens in this code:1. The command evaluates the impact of removing the frozen region restriction.2. The engine returns a property indicating that the action will require reinitialization.3. The effective_refresh_action_reason property details the cause.### What returnsField | Description---|---operation | The DDL operation tested in the statement.domain | The domain of the affected object, returned as DYNAMIC_TABLE for the dynamic table.name | The fully qualified name of the dynamic table.changes | List of changes the statement would make to the structure.effects | Array containing the effect type and predicted refresh properties.### Limitations and requirementsThe feature is in General Availability. The prediction reflects the current state of the data and the object at the exact moment the query runs. The analysis covers only the target dynamic table of the statement and does not verify other downstream dynamic tables read by the query.

Ver nota oficial do Snowflake

Predict dynamic table refresh behavior with EXPLAIN CHANGES (General availability)

Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.

Relacionadas