<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Copy data into lakehouse and warehouse - append or overwrite in Copy job</title>
    <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3331010#M3</link>
    <description>&lt;P&gt;When creating a data pipeline that copies data into a lakehouse, I can choose whether to Append or Overwrite data. If I choose to Overwrite, repeated runs of the pipeline do not create duplicate records.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, there is no option to Append or Overwrite when creating a data pipeline that copies data into a warehouse. As a result, repeated runs of the pipeline create duplicate records in the warehouse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shouldn't the option to Append or Overwrite be present in the warehouse experience too?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or have I misunderstood the intent? Any wisdom appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Duncan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jul 2025 15:48:46 GMT</pubDate>
    <dc:creator>DuncanJ</dc:creator>
    <dc:date>2025-07-14T15:48:46Z</dc:date>
    <item>
      <title>Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3331010#M3</link>
      <description>&lt;P&gt;When creating a data pipeline that copies data into a lakehouse, I can choose whether to Append or Overwrite data. If I choose to Overwrite, repeated runs of the pipeline do not create duplicate records.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, there is no option to Append or Overwrite when creating a data pipeline that copies data into a warehouse. As a result, repeated runs of the pipeline create duplicate records in the warehouse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shouldn't the option to Append or Overwrite be present in the warehouse experience too?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or have I misunderstood the intent? Any wisdom appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Duncan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 15:48:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3331010#M3</guid>
      <dc:creator>DuncanJ</dc:creator>
      <dc:date>2025-07-14T15:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3331166#M4</link>
      <description>&lt;P&gt;Hi Duncan !&lt;/P&gt;&lt;P&gt;Yes you absolutely right. There is no option to overwrite data like in Data Lakehouse.&lt;/P&gt;&lt;P&gt;In alternative way you can use staging tables to do all transformations.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 11:50:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3331166#M4</guid>
      <dc:creator>Majid_</dc:creator>
      <dc:date>2023-07-14T11:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332063#M5</link>
      <description>&lt;P&gt;Thank you Majid.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand why there is no option to overwrite data though. If it makes sense to have the option with a lakehouse, doesn't it makse sense to have the option with a warehouse? Then it would be trivial to keep the data in sync between e.g. Azure SQL Databases and a warehouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, I think it would greaet to have the copy data activity be consistent irrespective of destination ... lakehouse or warehouse ... or am I completely missing the basic concept here?&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Duncan&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 05:40:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332063#M5</guid>
      <dc:creator>DuncanJ</dc:creator>
      <dc:date>2023-07-15T05:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332068#M6</link>
      <description>&lt;P&gt;Duncan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I agree with you ) That's why it is in preview mode for now.&lt;/P&gt;&lt;P&gt;I hope the Microsoft team sees your post and fixes this small but very important issue! !&lt;/P&gt;&lt;P&gt;To be honest, I didn't notice it before.)&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 05:48:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332068#M6</guid>
      <dc:creator>Majid_</dc:creator>
      <dc:date>2023-07-15T05:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332086#M7</link>
      <description>&lt;P&gt;Thank you Majid!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 07:44:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332086#M7</guid>
      <dc:creator>DuncanJ</dc:creator>
      <dc:date>2023-07-15T07:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332105#M8</link>
      <description>&lt;P&gt;Continuing to explore this issue by reading&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Tables in data warehousing in Microsoft Fabric" href="https://learn.microsoft.com/en-us/fabric/data-warehouse/tables" target="_blank" rel="noopener"&gt;Tables in data warehousing in Microsoft Fabric&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="Primary keys, foreign keys, and unique keys in Warehouse in Microsoft Fabric" href="https://learn.microsoft.com/en-us/fabric/data-warehouse/table-constraints" target="_blank" rel="noopener"&gt;Primary keys, foreign keys, and unique keys in Warehouse in Microsoft Fabric&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought it may be that the copy data into warehouse activity would automatically upsert based on keys in the target, but multiple runs of the pipeline result in duplicated data. May be because the constraints have to be declared as NOT ENFORCED. Makes sense, becaue the&amp;nbsp;&lt;A title="Limitations" href="https://learn.microsoft.com/en-us/fabric/data-warehouse/tables#limitations" target="_blank" rel="noopener"&gt;Limitations&lt;/A&gt;&amp;nbsp;say unique indexes are not currently supported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps when the need to declare a primary key as NOT ENFORCED is removed in due course, upsert will happen automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the meantime, using the copy activity into a lakehouse works as expected. And I can PBI off that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So much to learn!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 08:59:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332105#M8</guid>
      <dc:creator>DuncanJ</dc:creator>
      <dc:date>2023-07-15T08:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332135#M9</link>
      <description>&lt;P&gt;You welcome, Duncan !&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2023 10:13:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/3332135#M9</guid>
      <dc:creator>Majid_</dc:creator>
      <dc:date>2023-07-15T10:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/4248080#M10</link>
      <description>&lt;P&gt;You could add a TRUNCATE TABLE (&lt;A href="https://learn.microsoft.com/en-us/sql/t-sql/statements/truncate-table-transact-sql?view=sql-server-ver16" target="_blank" rel="noopener"&gt;TRUNCATE TABLE (Transact-SQL) - SQL Server | Microsoft Learn&lt;/A&gt;) statement to the&amp;nbsp;&lt;SPAN&gt;Pre-copy script in the Advanced drop-down of the Destination tab on the Copy data activity. This would remove all rows from the table before writing the new data which would be functionally similar to using an overwrite operation.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 10:01:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/4248080#M10</guid>
      <dc:creator>NR85</dc:creator>
      <dc:date>2024-10-18T10:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/4358046#M11</link>
      <description>&lt;P&gt;This worked perfectly for me, had the same problem, I even thought i'd have to create a dataflow for a simple copy and replace job from an excel file to a warehouse table&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 02:21:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/4358046#M11</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-10T02:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data into lakehouse and warehouse - append or overwrite</title>
      <link>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/4608445#M12</link>
      <description>&lt;P&gt;My work around is to use the "pre-copy script". Since my pipeline activity copies multiple tables at the same time, the following works nicely. A truncate might also work.&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;@concat('delete from dbo.', item().destination.table )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 10:47:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Copy-job/Copy-data-into-lakehouse-and-warehouse-append-or-overwrite/m-p/4608445#M12</guid>
      <dc:creator>WLY168</dc:creator>
      <dc:date>2025-03-13T10:47:17Z</dc:date>
    </item>
  </channel>
</rss>

