<?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 How to prevent duplicate records when using MERGE INTO? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-prevent-duplicate-records-when-using-merge-into/m-p/177887#M57402</link>
    <description>&lt;P&gt;&lt;SPAN&gt;hello guys&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is the best way to handle a source dataset that contains multiple records for the same business key before performing a MERGE into a Delta table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example, the same customer ID may appear multiple times with different update timestamps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would using ROW_NUMBER() to retain the latest record be sufficient? How should we handle cases where multiple records have the same timestamp?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 28 Nov 2026 09:09:29 GMT</pubDate>
    <dc:creator>dataumer</dc:creator>
    <dc:date>2026-11-28T09:09:29Z</dc:date>
    <item>
      <title>How to prevent duplicate records when using MERGE INTO?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-prevent-duplicate-records-when-using-merge-into/m-p/177887#M57402</link>
      <description>&lt;P&gt;&lt;SPAN&gt;hello guys&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What is the best way to handle a source dataset that contains multiple records for the same business key before performing a MERGE into a Delta table?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example, the same customer ID may appear multiple times with different update timestamps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would using ROW_NUMBER() to retain the latest record be sufficient? How should we handle cases where multiple records have the same timestamp?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Nov 2026 09:09:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-prevent-duplicate-records-when-using-merge-into/m-p/177887#M57402</guid>
      <dc:creator>dataumer</dc:creator>
      <dc:date>2026-11-28T09:09:29Z</dc:date>
    </item>
  </channel>
</rss>

