When a scheduled load fails you want a repeatable routine: find the failing step, read the real error, decide whether it is transient or permanent, then fix the cause or add resilience. This article gives that routine for pipelines and for Dataflow Gen2.
A routine for pipelines
- Find the failed run in the Monitor hub and open it. A pipeline failure is reported at the pipeline level, but the cause is in an activity.
- Open the activity runs. Each activity shows its status plus links to input, output and error. Start at the first activity that failed, not at the last one. Downstream activities that depend on it are skipped or fail as a consequence.
- Read the error message and error code, then check the input. A wrong value coming out of an expression, a wrong parameter, or a missing connection shows up here.
- Decide: transient or permanent? A throttled API or a brief outage is transient. A wrong path, an expired credential or a schema mismatch is permanent and will fail every time.
Making pipelines resilient
- Retries. Enable retries on the activity's General tab. The retry count defaults to 1 and can go up to 1000. The interval can be fixed (30 seconds by default) or an increasing delay with exponential back-off, which suits longer outages. Retry conditions (preview) restrict retrying to chosen errors. Retrying a permanent failure only wastes time and capacity.
- Timeout. An activity has a timeout, 12 hours by default and at most seven days. A step that hangs is stopped at that point, so lower it for steps that should be quick.
- Dependency paths. Activities connect with Upon success, Upon failure, Upon completion and Upon skip. Put an error-handling branch, such as an email or a logging step, on Upon failure. Remember that a path only runs when the preceding activity ends in the matching state.
- Fail activity. Use it to fail a run on purpose, with your own message and error code, for example when a Lookup returns no rows or a validation check fails. The custom text appears in run history, which makes the cause obvious.
Copy activity errors
The Copy activity's monitoring view shows the duration of each step, and the longest is the bottleneck. For data-quality failures, two settings help:
- Fault tolerance lets the copy continue past some problems, for example skipping incompatible rows or files that were deleted or forbidden during the copy.
- Enable logging records the skipped files and rows so that skipped data is not lost silently.
Use these deliberately. Skipping rows turns a loud failure into a silent loss unless you read the log or check rowsSkipped in the output. Data consistency verification compares file sizes and checksums for files, or row counts for tables, to prove the copy is complete.
Typical causes of copy failures: expired credentials, no network path (an on-premises source needs a gateway), a destination column narrower than the data, and a source file that moved.
Dataflow Gen2 errors
Start from the dataflow's refresh history: status, duration, and the tables and activities of the failed refresh. For deeper detail, download the detailed logs (Mashup engine logs, kept up to 28 days, Viewer role needed).
Limits and rules that cause failures:
- A dataflow with CI/CD support allows up to 300 refreshes per rolling 24 hours, and 150 for a dataflow without it. A burst of refreshes can also be throttled.
- A single query evaluation may run for at most 8 hours, and a whole refresh for at most 24 hours.
- If a scheduled refresh fails every time over 72 hours (with enough runs) or over a week, the schedule is paused and the owner gets an email. Fix the cause and turn the schedule back on.
- The error about insufficient permissions for staging artifacts means the person who created the first dataflow in the workspace has not signed in for over 90 days or has left. That person must sign in again.
Destination settings matter too. Replace clears the destination on every refresh, and append adds to it. Schema changes on publish apply only to replace, so a new column in an appended table needs the mapping changed or the table recreated. With automatic settings the table can be dropped and recreated each refresh, which removes relationships or measures that were added on top of it. KQL databases do not support replace.
If a refresh is cancelled or fails midway, a staging query keeps the data from the last successful refresh, whereas a destination query keeps whatever was already written.
Common mistakes
- Reading only the pipeline-level message instead of the failed activity's error.
- Raising the retry count to hide a permanent error.
- Skipping bad rows without logging.
- Using append with a changing schema.
For the exam
- Debug from the first failed activity: look at its input, output and error.
- Retry for transient errors only; know the defaults (1 retry, 30 seconds, 12-hour timeout).
- Upon failure branches handle errors; the Fail activity creates custom errors.
- Copy fault tolerance skips incompatible rows; enable logging to record them.
- Dataflow Gen2 schedules pause after repeated failure; detailed logs help with diagnosis.