Chain Snowflake dynamic tables into a DAG using target_lag propagation

domain: data-engineering · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create each dynamic table with CREATE DYNAMIC TABLE ... TARGET_LAG = '<n> seconds|minutes|hours|days' WAREHOUSE = <wh> AS <query>, or TARGET_LAG = DOWNSTREAM to opt out of an independent schedule.
  2. For a DOWNSTREAM table, know that Snowflake refreshes it only as needed to satisfy the shortest target_lag among the tables that consume it — it has no schedule of its own.
  3. Verify every terminal (leaf) table in the DAG uses an explicit numeric target_lag, not DOWNSTREAM, since a DOWNSTREAM table with no consumer never auto-refreshes and Snowflake gives no warning.
  4. Leave REFRESH_MODE = AUTO (the default) unless you have a reason to force FULL or INCREMENTAL — AUTO resolves once at creation and is locked in, not re-evaluated as the query changes.
  5. Check which mode was actually chosen with SHOW DYNAMIC TABLES and inspect the refresh_mode / refresh_mode_reason columns.
  6. To change a locked-in refresh mode, CREATE OR REPLACE (or CREATE OR ALTER) the dynamic table — ALTER DYNAMIC TABLE cannot change it directly.

Known gotchas

Related routes

Configure Snowflake dynamic tables with incremental and full refresh modes for automated pipeline materialization
docs.snowflake.com · 6 steps · unrated
Snowflake Streams and Tasks: build an automated incremental processing pipeline
docs.snowflake.com · 5 steps · unrated
Ingest rows with Snowflake's high-performance Snowpipe Streaming SDK using channels
data-engineering · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans