Troubleshooting dynamic tables¶
This topic addresses solutions for troubleshooting dynamic tables that don’t run as expected:
Some actions might be restricted due to limitations on using dynamic tables or if you don’t have the necessary privileges. For more information, see Known limitations for dynamic tables and Dynamic table access control.
For information about dynamic table costs, see Understanding cost for dynamic tables.
If you encounter an issue not listed here, contact Snowflake Support.
Troubleshoot dynamic table refresh¶
Issue |
Solution |
---|---|
My dynamic table is using full refresh instead of incremental refresh. |
A dynamic table’s actual refresh mode is determined at creation time
and is immutable afterward. If not specified explicitly, the refresh mode defaults to For consistent behavior across Snowflake releases, explicitly set the refresh mode on all dynamic tables. For
example, if you want your dynamic tables to refresh only incrementally, you must explicitly set the refresh mode to
Using a role with the necessary privileges, you can verify the refresh mode using one of the following methods:
|
My dynamic table’s incremental refresh is slow. |
A dynamic table’s refresh performance relies on specific assumptions about the workload or data it’s handling. Use Refresh History to view variance or spot outliers:
|
My dynamic table is running an empty refresh but I am seeing a cost. |
Refreshes that produce zero net new rows (that is, zero rows added, updated, or deleted) consume warehouse resources when they’re associated with changes in any of the upstream objects referenced by the dynamic table. For example, if the associated virtual warehouse is suspended and no changes in base objects are identified, the suspended virtual warehouse doesn’t resume and no credits are consumed. This is referred to as a NO_DATA refresh. Conversely, if changes are identified, the virtual warehouse is automatically resumed to process the updates, which consumes warehouse resources even if the net result is zero rows applied to the dynamic table. If you’re seeing a cost but you haven’t made any changes to your dynamic table, it might be due to a change in your source table. You can use the Refresh History tab in Snowsight to check if virtual warehouse credits were consumed:
For more information, see Understanding cost for dynamic tables. |
My dynamic table skipped a refresh. |
Dynamic tables refresh on a schedule. When a scheduled refresh starts, the following situations might cause the refresh to skip:
Manual refreshes are never skipped but they can cause other refreshes to skip, especially if you perform frequent manual refreshes on a dynamic table. Doing so can prevent downstream dynamic tables from refreshing. For this reason, Snowflake doesn’t recommend you frequently perform manual refreshes on a dynamic table with downstream dynamic tables that are expected to refresh according to target lag. |
My dynamic table’s refresh failed. |
Like a regular Snowflake query, a dynamic table refresh can fail due to issues with the dynamic table’s query definition, input data (for example, parsing errors), or internal system issues. To determine why the refresh failed, do the following:
If the refresh failed due to an
|
My dynamic table is reinitializing. |
Your dynamic table might be reinitializing due to one of the following reasons:
For general information about initialization, see Understanding dynamic table initialization. |
Troubleshoot dynamic table creation¶
Issue |
Solution |
---|---|
My dynamic table is taking a long time to create. |
When you create a dynamic table using a CREATE DYNAMIC TABLE statement, its initial refresh takes place either at a
scheduled time ( Initialization can take some time, depending on how much data is scanned. To view progress, do the following:
For general information about initialization, see Understanding dynamic table initialization. |
Debug dynamic tables¶
Issue |
Solution |
---|---|
I can’t see the metadata for my dynamic table. |
To view the metadata and Information Schema of a dynamic table, you must use a role that has the MONITOR privilege on that dynamic table. For more information, see Privileges to view a dynamic table’s metadata. |
My dynamic table is suspended. |
A dynamic table might be suspended for several reasons:
To see the reason why your dynamic table was suspended, do the following:
|