Handling Failed Syncs: Alerting, Replays and Reconciliation

A failed sync costs most when nobody notices it, or when the fix creates duplicates. Handle failures in three layers: alert on errors and on silence, replay only through writes that are safe to repeat, and reconcile source against target on a schedule. This guide shows how Snowflake, Databricks and the HTTP standard each support one layer, and in what order to build them.

Key Takeaways

  • Failures come in three classes: loud, silent and wrong but green. Alerting that covers only the loud class leaves two gaps.
  • Snowpipe error notifications do not cover files that never reach the pipe, so a scheduled check on time since the last load is needed.
  • Databricks repairs re-run each unsuccessful task from the beginning and do not make tasks idempotent.
  • Make every sink merge on a business key before anyone builds a replay button.
  • Reconcile counts and key-field checksums on a schedule and after every replay.

What counts as a failed sync?

Most teams build alerting for one kind of failure and find the other two in production. We split failures into three classes. A loud failure reports an error.

A silent failure is a feed that stops with nothing reported. A wrong-but-green failure completes and leaves the target different from the source.

The vendor documentation backs this split. Snowflake states that if cloud storage stops sending event notifications, "no file fails, so Snowpipe sends no error notification". Databricks treats a job that finishes in a "Succeeded with failures" state as successful.

Each platform reports what it knows about. A gap in the feed is not something it knows about. The table maps each class to the check that catches it.

Failure classExampleWhat catches it
LoudA file fails to load, a task errorsSnowpipe error notification, Databricks failure notification
SilentEvent notifications stop, an upstream export never runsScheduled alert on time since the last successful load
PartialA file loads some rows and rejects othersAlert on the error table, not on notifications
Wrong but greenJob completes as "Succeeded with failures"Success notification plus scheduled reconciliation

How should failure alerting be set up?

Start with the loud class, because both platforms give it to you directly. Snowpipe can publish a message to your cloud messaging topic when a file fails to load.

Databricks can notify on start, success, failure, a duration threshold and a streaming backlog. Its destinations include email, Slack, Microsoft Teams, PagerDuty and webhooks.

Read the delivery rules before wiring a pager to either. Snowflake delivers each error notification at least once.

A consumer "might receive the same message more than once", so deduplicate on the messageId field. Databricks does not send job-level notifications when failed tasks are retried, and tasks are retried three times by default.

If you want every failed task, use task notifications. Mute them until the last retry to keep the noise down.

Databricks also warns that Slack and Microsoft Teams message content might change. For a fixed schema it recommends a user-defined webhook, so parse webhooks and never chat messages.

We recommend that every alert has one named owner and one first action. An alert routed to a shared channel with no owner gets read by everyone and acted on by nobody. Put the first action in the alert text, such as "check the copy history for the failed file".

How do you alert on a sync that never ran?

Absence is the failure most teams skip. Snowflake says error notifications don't report a pipe that stops or stalls. It recommends a scheduled alert that calls SYSTEM$PIPE_STATUS and checks how long ago the pipe last loaded a file.

The same pattern works on any feed. Compare the last successful load with the cadence you expect, and alert when the gap is too long.

Choose the threshold from the feed's real cadence, not from a default. A daily export that lands at an uneven hour needs a wide window to avoid false alarms.

A feed that should arrive every few minutes needs a much tighter one. We set it from the longest gap in a normal month, plus a margin the owner agrees with.

Databricks offers a similar idea for streaming. A backlog notification fires when the average backlog over a 10-minute period exceeds your threshold.

Databricks then waits 30 minutes before sending another message. If your backlog matters within minutes, pair it with a check of your own.

How do you replay failed loads without creating duplicates?

Decide this before the first failure, because replay is where a small incident becomes a large one. Databricks is direct about it. A repair re-runs each unsuccessful task from the beginning, and "Lakeflow Jobs doesn't make tasks idempotent, so if a task wrote part of its output before it failed, re-running it can duplicate that data." Its advice is to use overwrite or merge instead of append.

The HTTP standard gives the underlying rule. RFC 9110 defines an idempotent method as one where multiple identical requests have the same intended effect as a single request.

A client should not automatically retry a non-idempotent request unless it can know the request is safe to repeat. It may also retry if it can detect that the original was never applied.

The same test applies to a sync sink. If you can't say whether the first attempt landed, you can't retry it blindly.

Our advice is to make the sink safe first and the replay tool second. Merge on a business key, such as an order or profile identifier, so a repeat updates a row instead of adding one.

Then replay the smallest unit that failed: one file, one task, one time window. The common failure mode is a replay of the whole day because nobody recorded the failed slice. Our post on when a warehouse-native CDP fits covers syncing only changed rows, which gives you the key to merge on.

Keep the runbook short. Stop the cause, identify the failed slice, confirm the sink merges on a key, replay that slice, then reconcile. The person on call should be able to follow it without asking the author.

How do you reconcile source against target?

Reconciliation catches the wrong-but-green class, and neither platform does it for you. We compare two things on a schedule. One is a count per entity per day.

The other is a checksum over a few key fields for a sample of records. Counts find missing and duplicated rows, and checksums find rows that arrived but differ.

Start with the one entity that hurts most when it is wrong, such as orders or consent status. Agree the tolerance with the business owner in advance.

An exact match isn't always realistic while late data is still arriving. Treat every mismatch outside tolerance as a ticket with an owner, never as a dashboard colour.

Run reconciliation after every replay as well as on the schedule. A replay that reports success proves only that the job finished.

The count and checksum prove that the target is right. Teams that want help with the integration and data governance side can look at our customer data management service.

What does this look like in a worked example?

This is a hypothetical example, not a client case. A retailer loads daily order files into a Snowflake table through Snowpipe, with the default ON_ERROR = SKIP_FILE setting.

One day a file contains a malformed row. Snowpipe skips the file and sends an error notification to the team's topic.

The alert names the owner and the first action: find the file in the copy history, read the first error, and fix the source. The owner corrects the file and sends it through again.

The target merges on the order identifier, so a repeat can't duplicate rows. A reconciliation job then compares order counts for that day and they match.

Some weeks later the storage service stops sending event notifications after a configuration change. No file fails, so no error notification arrives.

The scheduled alert on time since the last load fires, because the gap now exceeds the agreed window. Without it, the team would have heard from a business user first.

In what order should a team build this?

Build in the order that closes the most expensive gaps first. The table shows the sequence we recommend and the reason for each position.

OrderBuildWhy this position
FirstFailure alerts with an owner and a first actionCheapest layer, and both platforms support it directly
SecondAbsence alerts on time since last loadCatches the failures that raise no error
ThirdIdempotent writes on every sinkMakes any later retry safe
FourthA short replay runbookOnly safe once writes are idempotent
FifthScheduled reconciliation on the key entityConfirms the target is right, not just that jobs ran

Teams often reverse the third and fourth rows and build a replay button before the writes are safe. That is how a one-hour incident turns into a clean-up of duplicated records.

Frequently Asked Questions

1. Does a failure notification tell me everything that went wrong in a load?

Snowflake notes that error notifications report only the first error in each file. To record every rejected row, turn on error logging for the target table and set ON_ERROR = CONTINUE. Then alert on the error table, because the pipe sends notifications only for files from which no rows load.

2. Is it safe to re-run a failed Databricks job?

It depends on what the task writes. A repair re-runs each unsuccessful task from the beginning and doesn't make tasks idempotent. A task that appended data before failing can duplicate it, so use overwrite or merge where duplicates matter.

3. Why do I need an alert for a sync that didn't run?

Because nothing fails when nothing arrives. Snowflake's guidance is that error notifications don't cover files that never reach the pipe. You need a scheduled check on how long ago the last load happened.

4. Where does the retry rule for non-idempotent requests come from?

RFC 9110, the HTTP semantics standard published by the IETF in June 2022. A client should not automatically retry a non-idempotent request unless it knows the request is safe to repeat. It may also retry if it can detect that the original was never applied.

5. Who should receive a failure alert?

We recommend one named owner per feed, with the first action written into the alert. A shared channel with no owner tends to be read by everyone and acted on by nobody.

Sources

CustomerIK works across customer data management, product engineering and martech strategy.

If a sync failure has cost your team a clean-up it didn't need, let's talk.

Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website.

Accept all cookies
Accept all cookies

These items are required to enable basic website functionality.

Always active

These items are used to deliver advertising that is more relevant to you and your interests.

These items allow the website to remember choices you make (such as your user name, language, or the region you are in) and provide enhanced, more personal features.

These items help the website operator understand how its website performs, how visitors interact with the site, and whether there may be technical issues.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.