<?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 Hash Function for Row Compare in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Hash-Function-for-Row-Compare/m-p/4856278#M13056</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a Data Pipeline that loads data into a Dataverse table. I do a row compare to detect changes between loads, so I am only loading rows that have changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway to hash the concat of rows? At the moment it seems I can only do plain-text and then convert it to Binary. Hashing would help save on space.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Oct 2025 00:58:23 GMT</pubDate>
    <dc:creator>adamlob</dc:creator>
    <dc:date>2025-10-23T00:58:23Z</dc:date>
    <item>
      <title>Hash Function for Row Compare</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Hash-Function-for-Row-Compare/m-p/4856278#M13056</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a Data Pipeline that loads data into a Dataverse table. I do a row compare to detect changes between loads, so I am only loading rows that have changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway to hash the concat of rows? At the moment it seems I can only do plain-text and then convert it to Binary. Hashing would help save on space.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 00:58:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Hash-Function-for-Row-Compare/m-p/4856278#M13056</guid>
      <dc:creator>adamlob</dc:creator>
      <dc:date>2025-10-23T00:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Function for Row Compare</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Hash-Function-for-Row-Compare/m-p/4856614#M13067</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1336902" data-lia-user-login="adamlob" class="lia-mention lia-mention-user"&gt;adamlob&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In &lt;STRONG&gt;Dataflow Gen2 / Fabric Data Pipeline (Data Factory)&lt;/STRONG&gt;, there’s no &lt;EM&gt;native&lt;/EM&gt; “Hash” transformation yet.&lt;/P&gt;&lt;P&gt;You can use Notebooks to do that :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;from pyspark.sql.functions import sha2, concat_ws&lt;BR /&gt;&lt;BR /&gt;df_hashed = df.withColumn(&lt;BR /&gt;"row_hash",&lt;BR /&gt;sha2(concat_ws("|", *df.columns), 256)&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then save it back to your Lakehouse table and use that hash for change-detection.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; Benefits:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Very fast and scalable,&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Produces fixed-length SHA-256 strings (~64 chars),&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Easy to use as a comparison key.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Doc :&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&lt;A href="https://spark.apache.org/docs/latest/api/sql/index.html#sha2" target="_blank" rel="noopener"&gt;https://spark.apache.org/docs/latest/api/sql/index.html#sha2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it can help you !&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Antoine&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 08:16:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Hash-Function-for-Row-Compare/m-p/4856614#M13067</guid>
      <dc:creator>AntoineW</dc:creator>
      <dc:date>2025-10-23T08:16:44Z</dc:date>
    </item>
  </channel>
</rss>

