Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Append Table action in Data pipeline duplicates all data rows instead of appending the new rows

When a pipeline which uses copy data assistant is set to Append mode, every consequest refresh doules the data in Lakehouse table. Example: If there are initially 10 records in the table, performin...
  • V-yubandi-msft's avatar
    1 year ago

    Hi Anonymous ,

    Thank you for engaging with the Microsoft Fabric Communit. and spencer_sa  explained it well.

    To summarize.

    1. Append mode in Microsoft Fabric’s Copy Data Assistant will re-add all source records on each refresh, even if they already exist in the destination.

    2. This is expected behavior, as Append mode does not perform deduplication or check for changes.

    3. Overwrite mode is your best option if you want to always keep only the latest version of the source data.

    4. For more advanced control, you’ll need to use a Notebook with Spark SQL or PySpark.

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

  • V-yubandi-msft's avatar
    V-yubandi-msft
    1 year ago

    Hi Anonymous ,

    1. Append mode in Microsoft Fabric’s Copy Data pipelines does not check for existing records, it simply adds all data from the source to the destination each time it runs. Although this method is efficient for data ingestion, it does not prevent duplicates or track changes, which can result in data duplication if the source includes both old and new records.

     

    2. Additionally, duplicated primary keys can disrupt reporting and cause inconsistencies. Since Append mode does not enforce uniqueness or support upserts (updates/inserts), you will need to implement additional logic using Spark Notebooks or SQL MERGE to maintain data integrity in your lakehouse.

     

    3. Conversely, Overwrite mode replaces the entire dataset with each run. While suitable for full refreshes, it is inefficient for frequently updated large datasets. For substantial data updates, utilizing SparkSQL or PySpark in Notebooks is recommended in Fabric.

     

    4. A key distinction between Fabric Pipelines and Power Platform Dataflows is that Dataflows support incremental refresh and change tracking, whereas Fabric Pipelines do not. This can be confusing when working across platforms, so the best choice depends on your specific requirements.

     

    In Simply:

    Append mode = fast but duplicates everything.
    
    Overwrite mode = clean slate every run, but not scalable for big data.
    
    Upserts/deduplication = use Notebooks (Spark/PySpark) or SQL MERGE logic.
    
    Cross-platform behavior = yes, inconsistent; choose based on capabilities needed.

     

     Did I answer your question? Mark my post as a solution.