<?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 Re: SCD Type 2 in ADF only works when update sink runs before insert sink — why? in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4852842#M8640</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1312627" data-lia-user-login="AhmedShalaby" class="lia-mention lia-mention-user"&gt;AhmedShalaby&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I would also take a moment to thank &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1340679" data-lia-user-login="tayloramy" class="lia-mention lia-mention-user"&gt;tayloramy&lt;/a&gt;&amp;nbsp;  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.&amp;nbsp;&lt;BR /&gt;I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Microsoft Fabric Community Support Team.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Oct 2025 11:30:34 GMT</pubDate>
    <dc:creator>v-menakakota</dc:creator>
    <dc:date>2025-10-17T11:30:34Z</dc:date>
    <item>
      <title>SCD Type 2 in ADF only works when update sink runs before insert sink — why?</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4852308#M8638</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm implementing Slowly Changing Dimension Type 2 (SCD2) in Azure Data Factory using two sinks:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;One for &lt;STRONG&gt;updating&lt;/STRONG&gt; existing records (setting IsActive = 0 when changes are detected)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;One for &lt;STRONG&gt;inserting&lt;/STRONG&gt; new records (with IsActive = 1 and new hash value).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I noticed that the pipeline only works correctly if I run the &lt;STRONG&gt;update sink first&lt;/STRONG&gt; and then the &lt;STRONG&gt;insert sink&lt;/STRONG&gt;.&lt;BR /&gt;If I run the insert sink first, both old and new rows end up having IsActive = 1.&lt;/P&gt;&lt;P&gt;Can someone please explain why the order of sinks matters in this case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 23:54:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4852308#M8638</guid>
      <dc:creator>AhmedShalaby</dc:creator>
      <dc:date>2025-10-16T23:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: SCD Type 2 in ADF only works when update sink runs before insert sink — why?</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4852400#M8639</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1312627" data-lia-user-login="AhmedShalaby" class="lia-mention lia-mention-user"&gt;AhmedShalaby&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you run the &lt;STRONG&gt;insert&lt;/STRONG&gt; sink first, you create the new "current" row (IsActive = 1) before your &lt;STRONG&gt;update&lt;/STRONG&gt; sink tries to retire the old one. Most SCD2 update predicates look for the &lt;EM&gt;active&lt;/EM&gt; row for that business key whose attributes differ. After the insert has happened, the row that is “active” and matches the source hash is the &lt;STRONG&gt;new&lt;/STRONG&gt; row, so the update sink no longer finds the old row to set IsActive = 0. That’s why both rows remain IsActive = 1 unless you do the update step first.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 04:03:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4852400#M8639</guid>
      <dc:creator>tayloramy</dc:creator>
      <dc:date>2025-10-17T04:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: SCD Type 2 in ADF only works when update sink runs before insert sink — why?</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4852842#M8640</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1312627" data-lia-user-login="AhmedShalaby" class="lia-mention lia-mention-user"&gt;AhmedShalaby&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I would also take a moment to thank &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1340679" data-lia-user-login="tayloramy" class="lia-mention lia-mention-user"&gt;tayloramy&lt;/a&gt;&amp;nbsp;  , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.&amp;nbsp;&lt;BR /&gt;I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Microsoft Fabric Community Support Team.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 11:30:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4852842#M8640</guid>
      <dc:creator>v-menakakota</dc:creator>
      <dc:date>2025-10-17T11:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: SCD Type 2 in ADF only works when update sink runs before insert sink — why?</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4854424#M8642</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1312627" data-lia-user-login="AhmedShalaby" class="lia-mention lia-mention-user"&gt;AhmedShalaby&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Microsoft Fabric Community Support Team.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Oct 2025 04:53:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/SCD-Type-2-in-ADF-only-works-when-update-sink-runs-before-insert/m-p/4854424#M8642</guid>
      <dc:creator>v-menakakota</dc:creator>
      <dc:date>2025-10-21T04:53:50Z</dc:date>
    </item>
  </channel>
</rss>

