Monitor freshness, failures and safe recovery
A healthy pipeline delivers the intended changes within its freshness target and preserves their access rules. A green runtime alone is not enough.
Understand the idea
For an example target of five minutes, measure event arrival delay and the age of the last successful source check. No new rows could mean a quiet source, a stopped connector or expired credentials; counts alone cannot distinguish them.
| Concept | What it means |
|---|---|
| Lag | Delay between a source change and its arrival. |
| Backlog | Pending work that has not reached the destination. |
| Quarantine | Rejected input retained for investigation. |
| Reconciliation | An independent comparison of expected and observed data. |
A concrete example
For an example target of five minutes, measure event arrival delay and the age of the last successful source check. No new rows could mean a quiet source, a stopped connector or expired credentials; counts alone cannot distinguish them.
Remember: Check source polling health and checkpoints as well as destination activity; a stalled flow can look like a quiet source.
Explain it step by step · full theory
Understand the idea
For an example target of five minutes, measure event arrival delay and the age of the last successful source check. No new rows could mean a quiet source, a stopped connector or expired credentials; counts alone cannot distinguish them.
Inspect connector/runtime logs, queue depth, source API throttling and destination errors. A 401 suggests authentication, a 403 suggests authorization, and a 429 suggests rate limiting; inspect the actual provider response before taking action. Retry temporary failures with bounded backoff rather than repeatedly reauthenticating or increasing concurrency.
Apply it carefully
If credentials expire, repair the identity and resume using the documented checkpoint behavior. If state is lost or invalid, preserve evidence and plan a scoped resync plus reconciliation. Do not delete the runtime or reset connector state merely to clear a red status; that may remove the recovery boundary.
Record the affected source IDs, last successful position, destination counts and operator action. Before resuming, check source access and destination writes, then confirm both data freshness and permissions. The SQL below measures our fixture delay only; actual telemetry is obtained from your deployment’s configured logs and metrics.
Words used in this lesson
- Lag
- Delay between a source change and its arrival.
- Backlog
- Pending work that has not reached the destination.
- Quarantine
- Rejected input retained for investigation.
- Reconciliation
- An independent comparison of expected and observed data.
See how it works
Choose a step to explore the idea at your own pace.
Open the interactive explanation
Monitor freshness, failures and safe recovery
Follow the flow
A healthy pipeline delivers the intended changes within its freshness target and preserves their access rules. A green runtime alone is not enough.
Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.
Read the complete diagram explanation
- Follow the flow
A healthy pipeline delivers the intended changes within its freshness target and preserves their access rules. A green runtime alone is not enough.
- Find the boundary
Record the affected source IDs, last successful position, destination counts and operator action. Before resuming, check source access and destination writes, then confirm both data freshness and permissions. The SQL below measures our fixture delay only; actual telemetry is obtained from your deployment’s configured logs and metrics.
Try the SQL or command
Read → predict → run in your learning environment → compare. You can also learn by reading without an account.
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.
- No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
- 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.
- 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. - 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
SQL practice is manual. The website does not connect to external services. Connector deployment is a separate administrator-assisted exercise.
Hands-on SQL: Monitor freshness, failures and safe recovery
SELECT SOURCE_SYSTEM,COUNT(*) AS DELIVERED_EVENTS,
MAX(DATEDIFF('second',SOURCE_CHANGED_AT,INGESTED_AT)) AS MAX_ARRIVAL_SECONDS
FROM DOCUMENT_EVENTS GROUP BY SOURCE_SYSTEM ORDER BY SOURCE_SYSTEM;
SELECT * FROM DOCUMENT_EVENTS WHERE SOURCE_VERSION IS NULL
OR DOCUMENT_ID IS NULL OR OP NOT IN ('UPSERT','DELETE') OR OP IS NULL;What to expect and why
Both sources have maximum fixture arrival delay 120 seconds. SharePoint has 5 deliveries, Drive 1. The invalid-row query returns no rows. This does not prove a live source is current.
Check your understanding
Choose an answer, then check your reasoning. This is practice, not a scored test.
Try it yourself
Explain your decision: No rows arrived today. Is the source definitely unchanged?
Compare your reasoning
Check source polling health and checkpoints as well as destination activity; a stalled flow can look like a quiet source.
Official sources and curriculum
Module 09 · See module scope