<?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: dropDuplicates inside foreachBatch in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/dropduplicates-inside-foreachbatch/m-p/96344#M39261</link>
    <description>&lt;P&gt;Yes, you're correct! When using dropDuplicates within foreachBatch, it operates only on the current micro-batch, so it removes duplicates in a stateless manner for each batch independently. Since there's no continuous state tracking across batches, you don't need to specify a watermark.&lt;/P&gt;&lt;P&gt;If you need to track duplicates across batches, you'd have to handle state management explicitly or use a different approach.&lt;/P&gt;</description>
    <pubDate>Sun, 27 Oct 2024 17:30:15 GMT</pubDate>
    <dc:creator>navallyemul</dc:creator>
    <dc:date>2024-10-27T17:30:15Z</dc:date>
    <item>
      <title>dropDuplicates inside foreachBatch</title>
      <link>https://community.databricks.com/t5/data-engineering/dropduplicates-inside-foreachbatch/m-p/96208#M39237</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If I use&amp;nbsp;dropDuplicates inside foreachBatch, the&amp;nbsp;dropDuplicates will become stateless and no state. It just drop duplicates for the current micro batch so I don't have to specify watermark. Is this true?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2024 05:56:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dropduplicates-inside-foreachbatch/m-p/96208#M39237</guid>
      <dc:creator>MikeGo</dc:creator>
      <dc:date>2024-10-26T05:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: dropDuplicates inside foreachBatch</title>
      <link>https://community.databricks.com/t5/data-engineering/dropduplicates-inside-foreachbatch/m-p/96219#M39239</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/100643"&gt;@MikeGo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, you are correct. foreachBatch operates on a single batch at time, so you can safely use drop duplicates without worrying about state management.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2024 07:22:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dropduplicates-inside-foreachbatch/m-p/96219#M39239</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-10-26T07:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: dropDuplicates inside foreachBatch</title>
      <link>https://community.databricks.com/t5/data-engineering/dropduplicates-inside-foreachbatch/m-p/96344#M39261</link>
      <description>&lt;P&gt;Yes, you're correct! When using dropDuplicates within foreachBatch, it operates only on the current micro-batch, so it removes duplicates in a stateless manner for each batch independently. Since there's no continuous state tracking across batches, you don't need to specify a watermark.&lt;/P&gt;&lt;P&gt;If you need to track duplicates across batches, you'd have to handle state management explicitly or use a different approach.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 17:30:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dropduplicates-inside-foreachbatch/m-p/96344#M39261</guid>
      <dc:creator>navallyemul</dc:creator>
      <dc:date>2024-10-27T17:30:15Z</dc:date>
    </item>
  </channel>
</rss>

