metricsign
Start free
Medium severityconfigurationMicrosoft Fabric

Power BI Refresh Error:
Fabric Copy Activity Error 20771

What does this error mean?

The 'deleteFilesAfterCompletion' setting is only supported when the copy activity is configured for direct binary copy. It must be removed or the activity must be reconfigured to use direct binary copy.

Common causes

  • 1The 'deleteFilesAfterCompletion' option was enabled on a copy activity that uses a non-binary format such as Parquet, CSV, or JSON
  • 2The pipeline was designed to delete source files post-copy but the format or schema transformation settings prevent direct binary copy mode
  • 3A pipeline template included 'deleteFilesAfterCompletion' without verifying compatibility with the configured source connector and format

How to fix it

  1. 1Step 1: Open the copy activity in your Fabric Data Factory pipeline editor and check the source format settings to determine whether direct binary copy is configured.
  2. 2Step 2: If you do not need to delete source files after the copy, navigate to the copy activity settings and remove the 'deleteFilesAfterCompletion' property.
  3. 3Step 3: If deleting source files after copy is a requirement, switch the copy activity to direct binary copy mode by setting the source and sink formats to Binary with no schema mapping.
  4. 4Step 4: Validate that switching to binary copy does not break downstream consumers that rely on specific file formats.
  5. 5Step 5: Save, republish, and re-run the pipeline to confirm the error is resolved.

Frequently asked questions

What is 'direct binary copy' and how does it differ from a regular copy activity?

Direct binary copy transfers files as-is without any format parsing or schema transformation. Both the source and sink must be configured with a Binary format dataset and no column mappings. This mode is faster and supports additional settings like 'deleteFilesAfterCompletion' that are unavailable in format-aware copy modes.

Is there an alternative way to delete source files after a copy if I cannot use binary copy mode?

Yes. You can add a Delete activity after the copy activity in your pipeline and configure it to target the source files or folder. This approach works regardless of the copy format and gives you explicit control over the deletion step.

Other configuration errors