<?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 Drop duplicates in Table in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/drop-duplicates-in-table/m-p/27178#M19058</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;there is a function to delete data from a Delta Table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;deltaTable = DeltaTable.forPath(spark, "/data/events/")
deltaTable.delete(col("date") &amp;lt; "2017-01-01")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But is there also a way to drop duplicates somehow? Like deltaTable.dropDuplicates()...&lt;/P&gt;
&lt;P&gt;I don't want to read the whole table as dataframe, drop the duplicates, and write it to storage again&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 May 2020 11:21:37 GMT</pubDate>
    <dc:creator>ChristianHofste</dc:creator>
    <dc:date>2020-05-07T11:21:37Z</dc:date>
    <item>
      <title>Drop duplicates in Table</title>
      <link>https://community.databricks.com/t5/data-engineering/drop-duplicates-in-table/m-p/27178#M19058</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;there is a function to delete data from a Delta Table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;deltaTable = DeltaTable.forPath(spark, "/data/events/")
deltaTable.delete(col("date") &amp;lt; "2017-01-01")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But is there also a way to drop duplicates somehow? Like deltaTable.dropDuplicates()...&lt;/P&gt;
&lt;P&gt;I don't want to read the whole table as dataframe, drop the duplicates, and write it to storage again&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 11:21:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/drop-duplicates-in-table/m-p/27178#M19058</guid>
      <dc:creator>ChristianHofste</dc:creator>
      <dc:date>2020-05-07T11:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Drop duplicates in Table</title>
      <link>https://community.databricks.com/t5/data-engineering/drop-duplicates-in-table/m-p/27179#M19059</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi @Christian Hofstetter, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;You can check here for info on the same,&lt;P&gt;&lt;/P&gt;&lt;A href="https://docs.delta.io/0.4.0/delta-update.html#data-deduplication-when-writing-into-delta-tables" target="_blank"&gt;https://docs.delta.io/0.4.0/delta-update.html#data-deduplication-when-writing-into-delta-tables&lt;/A&gt;</description>
      <pubDate>Tue, 19 May 2020 21:55:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/drop-duplicates-in-table/m-p/27179#M19059</guid>
      <dc:creator>shyam_9</dc:creator>
      <dc:date>2020-05-19T21:55:34Z</dc:date>
    </item>
  </channel>
</rss>

