Module 20 · Lesson 7 of 11Detailed study · about 28 min

Snowflake Operational Dashboards and Incident Response: From SLA Miss to Root Cause

Build a dashboard from expected deliveries and audit attempts. Follow Snowflake evidence to recover a missed batch and prevent a repeat.

Before you beginLearn to reconcile pipeline stages

Build the dashboard around the delivery promise

Start with one row per expected batch. A LEFT JOIN preserves an expected batch even when it has no audit rows. Combine attempts by batch ID before joining so a repeat does not increase the delivery count. Keep both the latest attempt and first successful publication if you need to distinguish an earlier failure from a later recovery.

The example computes an as-of report for the capstone data. It includes expected rows whose deadline is within the selected look-back or a future planned delivery. In production, filter both ends of the reporting window and use a controlled calendar so a missing expectation is itself detectable.

Representative dashboard rows before and after recovery
CheckpointBatchAttemptsFailuresDelivery state
08:00 UTCB10110ON_TIME
08:00 UTCB10211MISSING
08:12 UTCB10221LATE_RECOVERED
SQL · configuration template
WITH attempt_rollup AS (
  SELECT batch_id,
         COUNT(*) AS attempts,
         COALESCE(COUNT_IF(status IN ('REJECTED', 'ERROR')), 0) AS failures,
         MIN(IFF(status = 'PUBLISHED', finished_at, NULL)) AS first_publish,
         MAX(IFF(status = 'PUBLISHED', source_cutoff, NULL)) AS published_source_cutoff
  FROM LS_M20_OPS_LAB.OPS.BATCH_AUDIT GROUP BY batch_id
)
SELECT e.batch_id, e.due_at, a.first_publish,
       COALESCE(a.attempts, 0) AS attempts, COALESCE(a.failures, 0) AS failures,
       DATEDIFF('minute', a.published_source_cutoff, CURRENT_TIMESTAMP()) AS data_age_min,
       CASE WHEN a.first_publish <= e.due_at THEN 'ON_TIME'
            WHEN a.first_publish > e.due_at THEN 'LATE_RECOVERED'
            WHEN e.due_at <= CURRENT_TIMESTAMP() THEN 'MISSING'
            ELSE 'WAITING' END AS delivery_state
FROM LS_M20_OPS_LAB.OPS.EXPECTED_BATCHES AS e
LEFT JOIN attempt_rollup AS a ON e.batch_id = a.batch_id
WHERE e.due_at >= DATEADD('day', -7, CURRENT_TIMESTAMP())
ORDER BY e.due_at;

Choose measures that lead to an action

Show delivery success rate as on-time deliveries divided by all expected deliveries whose due time passed. Show freshness as the distance from the current clock to the last verified source cutoff. Track execution duration from attempt start to finish, and count failed attempts separately from missed deliveries. In a trend, display a typical duration and a high percentile so slow runs are visible. Use a volume-aware comparison for rates.

Add task failures, sustained queueing, replication lag and publishing status as separate panels. Include timestamp, time zone, source and update frequency for each panel. Show “no evidence” or “monitor stale” when appropriate. In Snowsight or an approved dashboard tool, use a warehouse and a read-only role with approved access to the audit. Aggregate or filter SQL text, identities and object details before sharing the dashboard.

Examples of metrics with an associated response
MeasureExampleDecision
Report deliveryB102 missing at cutoffPage the data owner for a time-sensitive report.
Run durationMost runs take 2 min; latest took 15 minInspect timing by stage and warehouse queue.
Data ageCurrent report reflects yesterday’s source cutoffCheck expected arrival and last verified publication.
Monitor heartbeatLast check was two intervals agoCheck the monitoring job even if no pipeline alert fired.

Walk through the missed Maple Market report

At 08:00 UTC the operations dashboard shows yesterday’s sales. Record the report, batch ID, detection time and business impact. The incident owner updates the report owner. Do not skip evidence collection by restarting the pipeline.

Check each likely cause in order. Save query IDs and sanitized metadata, and compare against the same batch. The example below is a simulated clocked incident. In the capstone, a controlled missing amount reproduces the problem using the test account’s actual timestamps.

Representative evidence for the 08:00 incident
HypothesisEvidenceDecision
Source arrival07:48 UTC · file and manifest show 2 expected rowsSource delivered. Check what raw received.
Load / ingestionRaw table contains 2 B102 recordsThe transport was complete in this case.
Orchestration07:50 UTC · task failed; history gives q-maple-22Trace the statement to the validation audit.
Compute capacityNo sustained warehouse queue at 07:50Focus on the failed validation, not a warehouse change.
Data qualityB102 order 704 is missing AMOUNTAsk the source owner for a correction before retrying.
Recovery08:12 UTC · both B102 rows published and sum to 100Close after checking totals and telling the report owner.
Work backwards from the stale report Prove each handoff before blaming the next team.
  1. Detect missing publicationCollect evidence to Trace first failed handoff
  2. Trace first failed handoffChoose a fix to Correct and retry
  3. Correct and retryConfirm result to Verify and prevent
Detect missing publication
B102 due at 08:00 UTC.
Trace first failed handoff
Source and load checked, validation rejected.
Correct and retry
One controlled write using the original batch ID.
Verify and prevent
Reconcile target, mark the incident and add prevention.

Close the incident only after validating the impact

Acknowledge the breach, keep the failed attempt and document why it happened. Check the published report with the same role and filters actual users use. Confirm that a retry preserved earlier successful batches and did not send duplicate alerts.

Assign the source owner to validate sales amounts before delivery. Assign the data platform team to add a pre-deadline check and a monitor heartbeat. Record who owns each action and what evidence will prove it is finished.

Interview practice

Explain the decision and the evidence you would use to test it.

Beginner · What does an operational dashboard show?

I show promised outcomes first, including delivery time and freshness. I add the supporting task, warehouse and ingestion status so someone can trace a failure.

SQL · How do you show a batch that never ran?

I left join scheduled batches to a summary of audit attempts. An expected row stays in the output even with zero attempts, so it becomes MISSING after the deadline.

Production · How would you investigate a failed Task?

I use task history to capture its query ID and error, then check the business audit and preceding handoff. If a retry is safe, I reconcile the published data and confirm the downstream report recovered.

Words used in this lesson
Incident severity
Priority based on who is affected, how serious the impact is and how soon action is needed.
Root cause
The condition that caused the failure, supported by evidence.
Runbook
A tested list of decisions, checks and actions for a known operational situation.
Heartbeat
An independent sign that a monitor has checked recently.

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

Use the SQL and expected outputs in the sections above.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Before running this lesson

Maple Market is fictional. Output tables are representative. Live commands require an authorized test account and the roles, compute and edition listed in each lesson.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

Which pair of rows most directly proves that an alert points to a real business impact?

Try it yourself

The monitoring dashboard shows no failed batches for two days. A manager says the report has not updated in two days. Name three checks.

Compare your reasoning

Check the dashboard heartbeat, the expected delivery list, and the latest published source cutoff. Missing jobs can produce no failures and still miss both deliveries.

Connect this lesson to the learning path

Official sources and curriculum

Module 20 · See module scope

By Rohit Ray · Independent educational lesson · Explore this visual lab