Skip to content

ADR-0004 — Poll COMPLETE_GRAPH_TASKS, not individual task status

Status: accepted Date: 2026-05-31

Context

A Snowflake Task graph has one root task and N child tasks. Sensing individual task status requires knowing the full graph topology in advance and polling each node separately. The INFORMATION_SCHEMA functions CURRENT_GRAPH_TASKS and COMPLETE_GRAPH_TASKS expose graph-level state from the root task FQN alone.

Decision

SnowflakeTaskSensor.poke() uses two queries in sequence: 1. CURRENT_GRAPH_TASKS(root_task_fqn) — if non-empty, graph still running → return False 2. COMPLETE_GRAPH_TASKS(root_task_fqn) WHERE STATE = 'FAILED' — if non-empty, raise

Success is inferred by elimination: graph not running and no failed tasks → return True.

Consequences

The sensor needs only the root task FQN — no knowledge of the graph topology. Works correctly for any graph shape (linear, parallel, conditional). Sensing is graph-level: one sensor per Snowflake Task graph, regardless of depth.