CertSafari
    Snowflake SnowPro Advanced: Data Engineer (DEA-C02)· Lessons

    Domain 2 · Lesson 10/22

    Monitoring continuous data pipelines in Snowflake

    Monitor continuous data pipelines.

    22 min read
    6.33% of exam
    11 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Choose between SHOW commands, INFORMATION_SCHEMA table functions, ACCOUNT_USAGE views and the event table, based on how far back a pipeline question needs to look
    • Use the Snowsight Tasks pages and TASK_HISTORY to find failed, skipped and long-running task runs
    • Configure retries, automatic suspension, stream-triggered runs and serverless compute so failing tasks waste fewer credits
    • Detect dynamic tables that miss their target lag and trace a refresh failure to its upstream cause
    • Turn on and query Snowpipe Streaming telemetry in an event table
    • Follow a failed data metric function check on a pipeline output table to the downstream assets it affects
    • Push task failures and alert messages through notification integrations to email, webhooks or cloud queues

    Key concept

    Pipeline monitoring ladder — Each Snowflake monitoring source answers a pipeline question over a different time window. SHOW commands give the current state, INFORMATION_SCHEMA table functions give about seven days of per-run detail, and ACCOUNT_USAGE views give up to a year of history. The event table collects telemetry as it happens, so alerts can act on failures without anyone running a query.

    1.The monitoring ladder: snapshot, recent history, long history, events

    Continuous pipelines tend to fail quietly. A task can stop running, a dynamic table can fall behind its freshness target, or a streaming channel can start rejecting rows, and the target table still looks normal until someone notices that the numbers are stale. Monitoring a pipeline therefore starts with one choice: which source can answer the question you have? Snowflake's sources form a ladder. Each rung looks further back in time or reacts sooner than the one below it.

    SHOW commands sit on the bottom rung. They report the current state and keep no history. SHOW DYNAMIC TABLES returns each table's refresh mode, warehouse and scheduling state as they are right now. It is also the only place to read the refresh_mode, refresh_mode_reason and warehouse columns. Use a SHOW command for a quick ad-hoc check, not to investigate something that happened earlier.

    INFORMATION_SCHEMA table functions cover the recent past, with one row per run or per refresh. The dynamic table functions keep 7 days. ACCOUNT_USAGE views (ACCOUNT_USAGE schema) hold the long history: the DYNAMIC_TABLE_REFRESH_HISTORY view keeps 365 days, and the Account Usage TASK_HISTORY view supports trends over months. The event table works differently. It receives telemetry as components emit it, and paired with an alert it pushes a failure to you instead of waiting for someone to look.

    Monitoring surfaces for dynamic tables, ordered by time window
    RungExample sourceData retentionBest for
    SnapshotSHOW DYNAMIC TABLESCurrent snapshotQuick status checks, viewing refresh mode and warehouse
    Recent historyINFORMATION_SCHEMA.DYNAMIC_TABLE_REFRESH_HISTORY()7 daysPer-refresh diagnostics: state, error, duration, trigger
    Long historyDYNAMIC_TABLE_REFRESH_HISTORY Account Usage view365 daysHistorical trend analysis beyond 7 days
    EventsEvent table + alertsConfigurableAutomated failure notifications

    Checkpoint 1 of 10· Match them up

    Match each monitoring source for dynamic tables to the pipeline question it is best placed to answer.

    Tap a term, then the definition that fits it.

    Sources1

    2.Watching task runs in Snowsight and SQL

    Tasks and task graphs run SQL on a schedule or when triggered, so a broken task never errors in front of a user. The run history is where you see it. In Snowsight, Transformation » Tasks shows task history for the whole account. Use it to find critical tasks that failed to run, long-running tasks, and tasks whose costs are rising.

    Choose View » Task Runs to list individual runs. From there, the Date Range filter covers anything from the last day to the last 12 months, and the Task status filter narrows the list to Succeeded, Failed, Cancelled or Skipped runs. To find slow tasks, show only successful runs and sort Duration in descending order. Open in worksheets turns the filtered view into SQL, which you can extend with GROUP BY to rank the schemas that hold the longest-running tasks.

    The Task Graphs tab summarises each root task. Hover over the Previous Runs counter to see the most recent run statuses in order. The Duration Trend graph draws a median line inside a min-max band, which shows at a glance whether a graph's durations are stable, drifting or spiking. Watch the Last Run Status filter: it matches only the latest completed run of each graph. A graph that failed yesterday and succeeded this morning shows as Succeeded.

    The Date Range filter on this page counts in rolling 24-hour windows, not calendar days, so a run near midnight can appear under the neighbouring date. For exact run times, query the TASK_HISTORY table function or the TASK_HISTORY view. A single task's Run History tab, under Catalog » Explorer, lists the scheduled time, status and duration of each run, but only if the task ran in the last 7 days.

    Seeing task history takes the same privileges as calling TASK_HISTORY: ACCOUNTADMIN, OWNERSHIP of the task, MONITOR or OPERATE on the task, or the global MONITOR EXECUTION privilege. The role also needs to read the Account Usage TASK_HISTORY view, which you can enable by granting it the USAGE_VIEWER database role. To find out who ran a task, look in QUERY_HISTORY. If the task did not run as a real user, the QUERY EXECUTED BY TASK column shows SYSTEM.

    Checkpoint 2 of 10· Check yourself

    A task graph failed its run yesterday evening and succeeded on its run this morning. On the Task Graphs tab, you set the Last Run Status filter to Failed to find graphs with recent failures. What happens to this graph?

    Sources23

    3.Task settings that stop failing runs from wasting credits

    Several task settings decide how much a failure costs you before anyone reads the history. Get them right and transient problems resolve themselves, while a pipeline that is truly broken stops itself.

    Run only when there is work. A task can run on a schedule, or it can be triggered by an event such as new data arriving in a stream. A stream keeps an offset into its source and does not copy table data. Combining a SCHEDULE with a WHEN clause that calls SYSTEM$STREAM_HAS_DATA means the task checks on every interval, but its body runs only when the stream holds unconsumed changes. A loop that polls row counts does not do this, a CRON schedule with an exception-throwing procedure does not do this, and neither does changing the compute size.

    A scheduled task that runs its body only when the stream has datasql
    CREATE TASK triggered_task_stream
      SCHEDULE = '1 HOUR'
      WHEN SYSTEM$STREAM_HAS_DATA('orders_stream')
      AS SELECT 1;

    Streams on views add one more thing to check. Change data on a view can be queried only if change tracking is enabled on the view and on its underlying tables, and only the owning role can enable it. If a stream on a view returns nothing, check change tracking on the base tables before you blame the task.

    Retry transient failures, and suspend on persistent ones. Automatic retry is off by default. Set TASK_AUTO_RETRY_ATTEMPTS above 0 and Snowflake retries a run that ends in a FAILED state. SUSPEND_TASK_AFTER_NUM_FAILURES handles the opposite case. Above 0, it suspends the task after that many consecutive runs fail or time out, so a broken pipeline stops consuming credits. You can set it on the task or at account, database or schema level, and a value set at a lower level overrides a higher one.

    These two settings do jobs that nothing else covers. Shortening the schedule is not a retry: it just runs a failing task more often. Catching and discarding every exception makes each broken run report success, so retry, suspension and error notifications never fire. Suspending after a single failure turns every brief timeout into a page for the on-call engineer.

    Match compute to the workload. Tasks run on one of two models. With serverless tasks, Snowflake predicts the resources each run needs and assigns them. With the user-managed model, you size and manage a virtual warehouse yourself. For a small, frequent statement whose load changes from day to day, serverless compute means you never have to size or resize a dedicated warehouse. A large or multi-cluster warehouse adds capacity the statement never uses.

    Checkpoint 3 of 10· Check yourself

    New rows land in a view's base tables every few minutes. A task with SCHEDULE = '1 HOUR' and WHEN SYSTEM$STREAM_HAS_DATA on a stream over that view never runs its body. Change tracking is confirmed on the view itself. What should you do next?

    Checkpoint 4 of 10· Exam question

    A data engineering team ingests raw order events into a landing table every few minutes with unpredictable arrival times. They want a downstream MERGE task to fire only when new change data actually exists, instead of running on a fixed schedule and finding nothing to process most of the time. Which design meets this requirement?

    Checkpoint 5 of 10· Exam question

    A pipeline includes a small task that runs a lightweight UPDATE against a dimension table every 5 minutes. Query load varies significantly across days, and the team does not want to size, monitor, or manually resize a dedicated warehouse just for this one task. Which compute model best fits this requirement?

    Checkpoint 6 of 10· Exam question

    An hourly task occasionally fails because an upstream API-based external function times out for a few seconds during peak load, and the failure is almost always transient. The team wants the task to automatically retry a failed run a few times before giving up, but they also want the task to stop scheduling new runs altogether if it fails many times in a row so it does not keep burning credits on a genuinely broken pipeline. Which combination of settings addresses both goals?

    Sources456

    4.Dynamic table freshness and refresh failures

    Dynamic tables refresh themselves to meet a target lag. Their health question is therefore whether the data is as fresh as promised, not whether a job ran. To read any of the metadata below you need MONITOR on the dynamic table, or a privilege that includes it.

    Use the INFORMATION_SCHEMA.DYNAMIC_TABLES() function for a check across all your dynamic tables. For each one it returns target_lag_sec, maximum_lag_sec, last_completed_refresh_state and time_within_target_lag_ratio. A ratio below 0.90 means the table misses its freshness target most of the time. The fix then sits in the refresh history, or in raising the target lag or the warehouse size.

    DYNAMIC_TABLE_REFRESH_HISTORY() returns one row per refresh, with its state, error code, error message, refresh action and trigger. Failures cascade, and the states show it. If DT_ORDERS fails with a type conversion error, the DT_ORDERS_DAILY table built on it records UPSTREAM_FAILED with the message that an input dynamic table failed, and refreshes nothing. Always follow an UPSTREAM_FAILED row upstream: the real error is on the parent table.

    Listing only failed refreshes in a schemasql
    SELECT
      name,
      state,
      state_code,
      state_message,
      data_timestamp
    FROM TABLE(INFORMATION_SCHEMA.DYNAMIC_TABLE_REFRESH_HISTORY(
      NAME_PREFIX => 'MY_DB.MY_SCHEMA',
      ERROR_ONLY => TRUE
    ))
    ORDER BY data_timestamp DESC;

    DYNAMIC_TABLE_GRAPH_HISTORY() records the pipeline's topology over time. Each row is a snapshot of one table's properties: its inputs, target lag and scheduling state. Changing the target lag adds a new row with a fresh valid_from and closes the previous row with a valid_to. Use it to answer "did someone change this pipeline?" when freshness drops for no obvious reason. Its scheduling states are named ACTIVE and SUSPENDED, while SHOW DYNAMIC TABLES calls the same states RUNNING and SUSPENDED.

    Checkpoint 7 of 10· Fill the gap

    You need every failed refresh in MY_DB.MY_SCHEMA from the last few days, with its error code and message, so you can trace an UPSTREAM_FAILED row back to its parent. Which table function completes this query?

    SELECT
      name,
      state,
      state_code,
      state_message,
      data_timestamp
    FROM TABLE(INFORMATION_SCHEMA. ? (
      NAME_PREFIX => 'MY_DB.MY_SCHEMA',
      ERROR_ONLY => TRUE
    ))
    ORDER BY data_timestamp DESC;

    Sources1

    5.Event tables and Snowpipe Streaming telemetry

    An event table stores monitoring records separately from the tables your pipeline loads. Pipeline components write logs and events to it, and you query it with SQL. You can query it to find failed tasks, and it underpins automated alerts on dynamic table refresh failures. Snowpipe Streaming is where it matters most, because rows arrive continuously and there are no files to inspect afterwards.

    Two settings control collection. EVENT_TABLE names the destination, and a database-level setting overrides the account-level one, so query whichever table SHOW PARAMETERS reports. LOG_EVENT_LEVEL, read on the schema that holds the target tables, decides what is recorded. INFO records all five Streaming event types, ERROR records only row and channel errors, and OFF records nothing while ingestion carries on normally. Enabling collection does not backfill past activity. To test it, send a fresh batch through Snowpipe Streaming, because an ordinary INSERT does not generate these events.

    Snowpipe Streaming event types in the event table
    Event nameSeverityWhat it reports
    commitINFORow counts and available offset tokens when data is committed to the target table
    latencyINFOTime Snowflake takes to process data for a channel
    row_errorERRORDetails about rows that failed processing
    channel_lifecycleINFOSuccessful channel OPEN and DROP operations
    channel_errorERRORA failure operating on a channel or committing its data
    Recent Snowpipe Streaming events for one target tablesql
    SELECT
      timestamp,
      record:"name"::STRING AS event_name,
      record:"severity_text"::STRING AS severity,
      resource_attributes:"snow.database.name"::STRING AS database_name,
      resource_attributes:"snow.schema.name"::STRING AS schema_name,
      resource_attributes:"snow.table.name"::STRING AS table_name,
      value:"channel_name"::STRING AS channel_name,
      value
    FROM <event_table>
    WHERE scope:"name"::STRING = 'snow.snowpipe.streaming'
      AND record_type = 'EVENT'
      AND resource_attributes:"snow.database.name"::STRING = '<database_name>'
      AND resource_attributes:"snow.schema.name"::STRING = '<schema_name>'
      AND resource_attributes:"snow.table.name"::STRING = '<table_name>'
      AND timestamp > DATEADD('minute', -15, CURRENT_TIMESTAMP())
    ORDER BY timestamp DESC;

    Three details trip people up when they read these events. Row counts belong to a single event and are not running totals, so sum row_count and error_count across commit events to get an error rate. Do not sum uncompressed_bytes, because a request that spans several channels repeats the same byte count in each channel's event. Finally, total_latency_ms starts when data reaches Snowflake's ingestion endpoint. It excludes time spent before that, so it is not the end-to-end delay from the source system.

    Checkpoint 8 of 10· Match them up

    Collection is on at INFO for the schema that holds your streaming target table. For each monitoring question, pick the Snowpipe Streaming event type you would filter on in the event table.

    Tap a term, then the definition that fits it.

    Sources73

    6.Data quality checks on pipeline output

    A pipeline can run on time and still deliver bad rows. Data metric functions (DMFs) attached to an output table measure things like null counts on a schedule. The table's DATA_METRIC_SCHEDULE parameter sets that schedule, and Snowsight shows it in the Run Schedule widget. A data quality check is a DMF association with an expectation: the value the DMF returns is compared with the expectation's criteria and either passes or fails.

    In Snowsight, open the table under Catalog » Explorer, then Data Quality » Monitoring. Work from the top down:

    1. Read the count of failed quality checks at the top of the page.
    2. In Checks by dimension, find the red group. Red means at least one DMF in that group failed.
    3. Expand the group and select the association whose checks did not all pass. The side panel's Status and Expression columns show which expectation was violated and what value it required.
    4. Open Impacted Assets to see downstream objects in the lineage that may carry the bad data.
    5. For system DMFs, select View failed records to run a SYSTEM$DATA_METRIC_SCAN query that returns the offending rows.

    Impacted Assets is more precise for single-column DMFs. When the DMF takes one column, a downstream view appears only if it actually contains data from that column. A multi-column custom DMF lists every downstream object. To list in SQL which DMFs are attached to a given output table, call the DATA_METRIC_FUNCTION_REFERENCES table function with REF_ENTITY_NAME and REF_ENTITY_DOMAIN.

    Checkpoint 9 of 10· Put it in order

    Snowsight shows failed data quality checks on a pipeline's output table. Put these steps on its Data Quality » Monitoring page in investigation order, from the top down.

    1. 1.In Checks by dimension, find the DMF group shown in red
    2. 2.Read the count of failed quality checks at the top of the Monitoring page
    3. 3.In the side panel, use the Status and Expression columns to see which expectation was violated and what value it required
    4. 4.Expand that group and select the DMF association whose checks did not all pass
    5. 5.Open Impacted Assets to find downstream objects in the lineage that may carry the bad data

    Sources89

    7.Alerts and notification integrations

    Everything above needs someone to look. An alert removes that step. It is a schema object that pairs a condition with an action and checks the condition either on a schedule or when new data arrives. In a typical example, the condition is that a gauge_value exceeds 200, and when it is true the action inserts a timestamp into a history table. The same shape works for pipelines: a condition counting failed task runs in the last hour, refresh errors, or a DMF result over its threshold, with an action that notifies someone. Creating one requires CREATE ALERT and USAGE on the schema, USAGE on the database, and USAGE on any warehouse the alert uses.

    Pick the trigger based on how urgent the problem is. A scheduled alert checks at a fixed interval, which is fine for an hourly count of failures. An alert on new data reacts when rows arrive in the table it watches, such as an error-logging table that captures refresh failures, without waiting for the next interval. For common cases you can create an alert from a predefined template in Snowsight or SQL instead of writing the condition and action yourself.

    Notification integrations carry messages out of Snowflake. To have a task report its own failures, set ERROR_INTEGRATION to a notification integration in CREATE TASK or ALTER TASK. In a task graph, set it on the root task only: a failed child task sends its notification through the root task's integration. Using an integration requires USAGE on it. Once TASK_AUTO_RETRY_ATTEMPTS is above 0, every failed attempt sends its own notification, so expect several messages for one transient outage.

    The template alerts deliver by email or webhook. To publish onto Amazon SNS, Google Cloud Pub/Sub or Azure Event Grid, where consumers already subscribe, write a custom alert whose action calls SYSTEM$SEND_SNOWFLAKE_NOTIFICATION with a queue notification integration. Subscribers then receive an ordinary cloud message and need nothing specific to Snowflake.

    Checkpoint 10 of 10· Check yourself

    Your on-call team only finds out that a nightly task graph failed when analysts report stale numbers the next day. You want the pipeline to tell the team when a run fails, so nobody has to go and look. Which change does that?

    Sources1011

    Sources

    (11)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “It is the only source for the refresh_mode, refresh_mode_reason, and warehouse columns.”
      ↩︎ The monitoring ladder: snapshot, recent history, long history, events
      “For automated alerting on refresh failures, set up an event table alert.”
      ↩︎ The monitoring ladder: snapshot, recent history, long history, events
      “Investigate the refresh history and consider adjusting the target lag or warehouse size.”
      ↩︎ Dynamic table freshness and refresh failures
      “Skipped refreshing because an input dynamic table failed.”
      ↩︎ Dynamic table freshness and refresh failures
      “For historical analysis beyond 7 days, use the Account Usage view.”
      ↩︎ Key concept
      “Both labels refer to the same operational state.”
      ↩︎ Exam trap 4
      “The DYNAMIC_TABLE_REFRESH_HISTORY table function retains data for 7 days.”
      ↩︎ Prediction
      “For automated alerting on refresh failures, set up an event table alert. For historical analysis beyond 7 days, use the Account Usage view.”
      ↩︎ Checkpoint
    2. 2.
      “Select the Task status filter to display task history for one or more status, such as Succeeded, Failed, Cancelled, or Skipped.”
      ↩︎ Watching task runs in Snowsight and SQL
      “This filter applies only to the latest completed run of a task graph.”
      ↩︎ Watching task runs in Snowsight and SQL
      “The Date Range filter uses rolling 24-hour windows rather than calendar days.”
      ↩︎ Watching task runs in Snowsight and SQL
      “Task history data is only available if the task has been executed in the last 7 days.”
      ↩︎ Watching task runs in Snowsight and SQL
    3. 3.
      “the QUERY EXECUTED BY TASK column displays the user name as”
      ↩︎ Watching task runs in Snowsight and SQL
      “You can also query the event table to determine if tasks failed to run.”
      ↩︎ Event tables and Snowpipe Streaming telemetry
      “You can configure Snowflake to push notifications when errors occur in task runs.”
      ↩︎ Checkpoint
    4. 4.
      “tasks are automatically suspended after the specified number of consecutive task runs either fail or time out.”
      ↩︎ Task settings that stop failing runs from wasting credits
      “Serverless tasks: Snowflake predicts resources that are needed and assigns them automatically.”
      ↩︎ Task settings that stop failing runs from wasting credits
      “Tasks can run at scheduled times or can be triggered by events, such as when new data arrives in a stream.”
      ↩︎ Task settings that stop failing runs from wasting credits
      “The automatic task retry is disabled by default.”
      ↩︎ Exam trap 1
    5. 5.
      “A stream only stores an offset for the source object and returns CDC records by leveraging the versioning history for the source object.”
      ↩︎ Task settings that stop failing runs from wasting credits
    6. 6.
      “For users to query change data on a view, change tracking must be enabled on the view and underlying tables.”
      ↩︎ Task settings that stop failing runs from wasting credits
    7. 7.
      “A database-level destination takes precedence over the account-level destination.”
      ↩︎ Event tables and Snowpipe Streaming telemetry
      “OFF: Records no Snowpipe Streaming events. Ingestion continues normally.”
      ↩︎ Event tables and Snowpipe Streaming telemetry
      “Row counts describe each event, not running totals.”
      ↩︎ Event tables and Snowpipe Streaming telemetry
      “The LOG_EVENT_LEVEL parameter controls which events Snowflake records and defaults to OFF.”
      ↩︎ Exam trap 3
      “The LOG_EVENT_LEVEL parameter controls which events Snowflake records and defaults to OFF.”
      ↩︎ Prediction
      “commit | INFO | Reports row counts and available offset tokens when Snowflake commits processed data to the target table.”
      ↩︎ Checkpoint
    8. 8.
      “A data quality check consists of a DMF association that has an expectation.”
      ↩︎ Data quality checks on pipeline output
      “Red indicates that at least one DMF in the group failed a quality check.”
      ↩︎ Data quality checks on pipeline output
    9. 9.
      “You can call the DATA_METRIC_FUNCTION_REFERENCES Information Schema table function to identify the DMFs associated with a given table or view.”
      ↩︎ Data quality checks on pipeline output
    10. 10.
      “you can create an alert from a predefined template for common alerting use cases instead of writing the condition and action yourself.”
      ↩︎ Alerts and notification integrations
      “Inserts the timestamp into gauge_value_exceeded_history if this condition evaluates to true.”
      ↩︎ Alerts and notification integrations
    11. 11.
      “create a custom alert whose action calls SYSTEM$SEND_SNOWFLAKE_NOTIFICATION with a queue notification integration.”
      ↩︎ Alerts and notification integrations
      “Tasks with TASK_AUTO_RETRY_ATTEMPTS set to a value greater than 0 send error notifications for each failed task run.”
      ↩︎ Alerts and notification integrations
      “The template delivers notifications by email or webhook.”
      ↩︎ Alerts and notification integrations
      “You only specify the error notification integrations on a root task of a task graph.”
      ↩︎ Exam trap 2

    Ready to test yourself?

    Practise the 24 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.