Snowflake

Tasks: Scheduling & Orchestrating SQL Workflows

Automate recurring SQL execution and chain dependent steps into pipelines.

A task is a Snowflake object that executes a single SQL statement (often a stored procedure call) on a schedule or in response to a predecessor task completing. Tasks are Snowflake's native scheduling mechanism, eliminating the need for external orchestration tools for straightforward pipeline needs.

Tasks are like a chain of dominoes you set on a timer — the first domino falls on schedule, and each subsequent domino only falls because the one before it did, with an optional sensor that skips a domino if there's nothing worth knocking over.

Key Concepts

1
Tasks can run on a CRON-style schedule or a fixed interval, and — critically — can be combined with streams to implement efficient CDC pipelines: a task checks SYSTEM$STREAM_HAS_DATA() and only executes its logic (and consumes the stream) WHEN there's actually new data, avoiding wasted compute on empty runs.
CRONstreamsSYSTEM$STREAM_HAS_DATA()WHEN
2
Multiple tasks can be chained into a DAG (directed acyclic graph) using AFTER clauses, where child tasks trigger automatically once their predecessor completes successfully. A single root task holds the schedule; downstream tasks fire based on the DAG structure rather than their own independent schedules.
DAG (directed acyclic graph)AFTER
3
Tasks can run on a dedicated virtual warehouse or use serverless compute (Snowflake-managed, auto-scaling compute billed per-second), which is often simpler to operate for variable or bursty workloads since there's no warehouse sizing decision to make.
serverless compute