FaniNikolaidou's avatar
FaniNikolaidou
New Member
5 months ago
Status:
New

Bug Report: Copy Activity fails with PathNotFound when source Delta table is empty in Micro

I would like to report a bug in Microsoft Fabric's Copy Activity when the source is an empty Delta table in a Lakehouse.

**Environment:**
- Service: Microsoft Fabric
- Activity: Copy Activity
- Source: Lakehouse Delta Table
- Destination: Fabric Warehouse Table

**Issue Description:**
When the source Delta table is empty (0 records), the Copy Activity fails with the following error:

ErrorCode=UserErrorFileNotFound
Message: ADLS Gen2 operation failed: Operation returned an invalid status code 'NotFound'.
ErrorCode: 'PathNotFound' - The specified path does not exist.
Path references an internal Staging path: 'MSSQLImportCommand'

**Steps to Reproduce:**
1. Create a Copy Activity in Fabric Pipeline
2. Set Source to a Lakehouse Delta Table that is empty (0 records)
3. Set Destination to a Fabric Warehouse Table
4. Run the pipeline

**Expected Behavior:**
The Copy Activity should complete successfully with 0 rows copied, similar to how it behaves in Azure Data Factory.

**Actual Behavior:**
The Copy Activity fails with PathNotFound error related to an internal staging path that is not created when the source is empty.

**Impact:**
This forces users to implement workarounds (e.g., Spark Notebook checks before Copy Activity) to avoid pipeline failures, adding unnecessary overhead and latency to data pipelines.

**Additional Notes:**
- The issue does not occur when the Delta table contains data
- The staging linked service cannot be manually configured in Fabric Copy Activity (unlike ADF), so there is no workaround within the activity itself

Please advise on a fix or official workaround.

Thank you.

No CommentsBe the first to comment

Recent ideas