Skip to content

Add Comprehensive Guide to Snowflake Data Quality Monitoring - #3506

Closed
sfc-gh-yostrinsky wants to merge 2 commits into
Snowflake-Labs:masterfrom
sfc-gh-yostrinsky:dq-monitoring-comprehensive-guide
Closed

sfc-gh-yostrinsky wants to merge 2 commits into
Snowflake-Labs:masterfrom
sfc-gh-yostrinsky:dq-monitoring-comprehensive-guide

Conversation

@sfc-gh-yostrinsky

Copy link
Copy Markdown
Collaborator

Summary

A new example-led guide to Data Quality Monitoring. Draft, opened for review.

  • Shape: a small shared setup, then self-contained recipes. A reader can run any single example on its own without working through the others, so the guide works as a reference you return to rather than a walkthrough you complete once.
  • Dataset: IoT sensor telemetry (DQ_EXAMPLES) with seven deliberately seeded defects, each named openly so every check is verifiable.
  • Coverage: the system metric catalogue and a decision table, twelve failure-mode recipes, custom metrics, schema-wide monitoring, AI-suggested checks, anomaly detection, remediation, notifications, a circuit breaker, layer strategy, quality as code, and cost.
  • SQL and UI in parallel. Snowsight paths sit alongside the SQL rather than being mentioned in passing.

Provenance

Every SQL block was run against a live Enterprise account and the result tables are real output, not illustrative. Three behaviours the guide calls out because they were found by running it:

  • FRESHNESS can return a negative value when a future-dated row is the newest timestamp, so a freshness check alone can be defeated by one bad timestamp. The guide pairs it with the clock-skew check.
  • SYSTEM$EVALUATE_DATA_QUALITY_EXPECTATIONS does not record its result; the _PERSIST_RESULT variant does. Anything reading monitoring history needs the latter.
  • UNSET DATA_METRIC_SCHEDULE reverts to the default hourly cadence rather than suspending monitoring. The suspend is SET DATA_METRIC_SCHEDULE = ''.

The circuit breaker was proven end to end (alert TRIGGERED, downstream task suspended), and uses an ALERT object because the native notification settings have no action hook.

Known gaps before this leaves draft

  • Screenshots — four TODO: screenshot placeholders mark what each image must show
  • Final review pass by the Data Quality team
  • The "Checks as Code" section describes the declarative path in prose; its SQL needs validating inside a real DCM project before it is added

Test plan

  • Every SQL block executed against a live Enterprise account (10.31.101)
  • All seven seeded defects confirmed detectable, one each
  • Circuit breaker verified: alert fired, downstream task suspended
  • Result tables in the guide match real query output
  • Snowsight click paths walked against a live UI

sfc-gh-yostrinsky and others added 2 commits September 18, 2026 10:56
Example-led guide: a small shared setup plus self-contained recipes, so a
reader can run any single example without working through the others.

Part 1 only (overview, setup, profiling, anatomy of a check). All SQL
verified against a live account; result tables are real output.

Covers two behaviours that are easy to get wrong: time-relative metrics
reject TIMESTAMP_NTZ, and UNSET DATA_METRIC_SCHEDULE reverts to the
default hourly cadence rather than suspending monitoring.

.... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-Authored-By: Cortex Code <noreply@snowflake.com>
Adds the metric catalogue and decision table, twelve failure-mode
recipes, custom metrics, schema-wide monitoring, AI-suggested checks,
anomaly detection, remediation, notifications, the circuit breaker,
layer strategy, quality as code, cost and cleanup.

Every SQL block runs against a live account and the result tables are
real output. Findings worth noting in the prose:

- FRESHNESS can return a negative value when a future-dated row is the
  newest timestamp, so a freshness check alone can be defeated by one
  bad timestamp. Paired with the clock-skew check.
- SYSTEM$EVALUATE_DATA_QUALITY_EXPECTATIONS does not record its result;
  the _PERSIST_RESULT variant does. Anything reading monitoring history
  needs the latter.
- The circuit breaker uses an ALERT because the native notification
  settings have no action hook. Proven end to end: alert TRIGGERED and
  the downstream task suspended.

.... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-Authored-By: Cortex Code <noreply@snowflake.com>
@sfc-gh-yostrinsky

Copy link
Copy Markdown
Collaborator Author

Superseded by #3542 — moved from a fork branch to a branch in this repository so the staging preview workflow can run, and rebased onto current master. Preview is live there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant