Manual refresh of dynamic tables with the scheduler enabled¶
You can manually refresh a dynamic table to include the latest data without waiting for the next scheduled refresh.
This is useful for one-time updates or when a table has a large target lag and the next refresh occurs much later.
Tip
Avoid frequent manual refreshes on dynamic tables with downstream dynamic tables that are expected to refresh according to target lag.
These kinds of manual refreshes can cause scheduled refreshes to skip and prevent downstream tables from updating.
To manually refresh, use the ALTER DYNAMIC TABLE … REFRESH command or Snowsight as shown in the following steps:
In the list, find your dynamic table, and then select » Refresh Manually.
For situations that require precise refresh timing, such as aligning refreshes with external system schedules or batch processing windows, you
can use a task with a CRON expression to trigger the refresh.
For example:
-- Create the taskCREATETASKmy_dt_refresh_taskWAREHOUSE=my_whSCHEDULE='USING CRON 0 0 * * * America/Los_Angeles'-- Example: daily at midnight PSTCOMMENT='Daily 5pm PT manual refresh of my_dynamic_table'ASALTERDYNAMIC TABLEmy_dynamic_tableREFRESH;-- Enable the taskALTERTASKmy_dt_refresh_taskRESUME;-- Show the taskSHOWTASKSLIKE'my_dt_refresh_task';
For most cases, Snowflake recommends using target lag, which optimizes refresh frequency and can reduce costs compared to fixed CRON schedules
that might run unnecessarily.
Manual refresh of dynamic tables with the scheduler disabled¶
Dynamic tables with the SCHEDULER attribute set to DISABLE can only be refreshed manually.
This type of manual refresh refreshes only that dynamic table. It doesn’t cascade to any upstream
dynamic tables, regardless of their scheduler state.
In the DYNAMIC_TABLE_REFRESH_HISTORY output, the REFRESH_TRIGGER value for these refreshes is
MANUAL. No SCHEDULED entries are generated for dynamic tables with SCHEDULER set to DISABLE.
This behavior allows external orchestrators, such as dbt, to issue one manual refresh per dynamic table without
triggering upstream refreshes.
To disable the scheduler and then manually refresh a dynamic table, use the ALTER DYNAMIC TABLE command as shown in the following steps: