liveBook · Manning

Root task

As explained in Snowflake Data Engineering

A root task is a scheduled task that begins an orchestrated task graph and can have dependent child tasks.

A root task starts an orchestrated data pipeline. It is the scheduled entry point of a task graph, while dependent tasks run only after predecessor tasks complete successfully. A root task can log pipeline startup, send notifications, or perform setup before ingestion and transformation begin. section 13.3

Use a root task to establish the pipeline’s operational boundary:

  • Schedule the root task; dependent child tasks do not require individual schedules. section 13.3
  • Place ingestion and transformation tasks after the root task, including independent tasks that can run in parallel. section 13.3.1
  • Attach a finalizer task to record completion, status, errors, or notifications after the graph finishes. section 13.3 section 13.3.3

Scheduled pipeline start

A pipeline can create PIPELINE_START_TASK with the BAKERY_WH warehouse, a ten-minute test schedule, and an email notification containing the execution timestamp. Child tasks then reference it with AFTER and may use stream-data conditions. section 13.3.2

Figure 13.2 Tasks and their dependencies in the task graph. The pipeline starts with a root task named PIPELINE_START_TASK, executes the data ingestion and transformation steps in sequence, and ends with a finalizer task named PIPELINE_END_TASK.
figure

Inspect the dependency graph from PIPELINE_START_TASK through ingestion and transformation tasks to PIPELINE_END_TASK. section 13.3.1

After building the graph, resume the tasks and use EXECUTE TASK on the root task for immediate execution instead of waiting for its schedule. Check TASK_HISTORY() to confirm successful, skipped, or failed steps; suspend the root task to stop scheduled executions. section 13.3.3 section 13.3.4

How Snowflake Data Engineering covers it

How deep it goes
Explains scheduling, dependencies, parallel children, finalization, execution, history checks, and suspension without detailing task internals.
Examples
Uses PIPELINE_START_TASK, partner and product child tasks, PIPELINE_END_TASK, email notifications, and a bakery pipeline graph.
What it assumes
Assumes task, warehouse, database, schema, stream, and role setup; demonstrates the graph with DATA_ENGINEER, BAKERY_WH, BAKERY_DB, and ORCHESTRATION.
What you can do after
Operate/configure a Snowflake task graph by creating, scheduling, linking, resuming, executing, monitoring, and suspending its root task.
How it connects
Connects root tasks with task graphs, task dependencies, child tasks, finalizer tasks, streams, scheduling, and TASK_HISTORY().

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Snowflake Data Engineering. The section links point to the parts of the book it draws on.