<?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: Does Delta refresh DF cache automatically after a delete? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/does-delta-refresh-df-cache-automatically-after-a-delete/m-p/22471#M15394</link>
    <description>&lt;P&gt;Yes. Delta actually explicitly refreshes the dataframe cache after performing delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code to test it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Seq((0,"A"), (1,"B"),(2,"C")  ).toDF("id","value").write.format("delta").mode("overwrite").saveAsTable("target_tbl") 
&amp;nbsp;
val df = spark.sql("select * from target_tbl")
df.persist()
df.show()
&amp;nbsp;
spark.sql("delete from target_tbl where id = 2")
df.show()
df.unpersist()
&amp;nbsp;
Output:
+---+-----+
| id|value|
+---+-----+
|  0|    A|
|  2|    C|
|  1|    B|
+---+-----+
+---+-----+
| id|value|
+---+-----+
|  0|    A|
|  1|    B|
+---+-----+&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jun 2021 19:52:07 GMT</pubDate>
    <dc:creator>MoJaMa</dc:creator>
    <dc:date>2021-06-18T19:52:07Z</dc:date>
    <item>
      <title>Does Delta refresh DF cache automatically after a delete?</title>
      <link>https://community.databricks.com/t5/data-engineering/does-delta-refresh-df-cache-automatically-after-a-delete/m-p/22470#M15393</link>
      <description />
      <pubDate>Fri, 18 Jun 2021 19:49:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/does-delta-refresh-df-cache-automatically-after-a-delete/m-p/22470#M15393</guid>
      <dc:creator>MoJaMa</dc:creator>
      <dc:date>2021-06-18T19:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Does Delta refresh DF cache automatically after a delete?</title>
      <link>https://community.databricks.com/t5/data-engineering/does-delta-refresh-df-cache-automatically-after-a-delete/m-p/22471#M15394</link>
      <description>&lt;P&gt;Yes. Delta actually explicitly refreshes the dataframe cache after performing delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code to test it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Seq((0,"A"), (1,"B"),(2,"C")  ).toDF("id","value").write.format("delta").mode("overwrite").saveAsTable("target_tbl") 
&amp;nbsp;
val df = spark.sql("select * from target_tbl")
df.persist()
df.show()
&amp;nbsp;
spark.sql("delete from target_tbl where id = 2")
df.show()
df.unpersist()
&amp;nbsp;
Output:
+---+-----+
| id|value|
+---+-----+
|  0|    A|
|  2|    C|
|  1|    B|
+---+-----+
+---+-----+
| id|value|
+---+-----+
|  0|    A|
|  1|    B|
+---+-----+&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 19:52:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/does-delta-refresh-df-cache-automatically-after-a-delete/m-p/22471#M15394</guid>
      <dc:creator>MoJaMa</dc:creator>
      <dc:date>2021-06-18T19:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Does Delta refresh DF cache automatically after a delete?</title>
      <link>https://community.databricks.com/t5/data-engineering/does-delta-refresh-df-cache-automatically-after-a-delete/m-p/22472#M15395</link>
      <description>&lt;P&gt;How about updates and inserts? does it refresh automatically?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 21:11:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/does-delta-refresh-df-cache-automatically-after-a-delete/m-p/22472#M15395</guid>
      <dc:creator>Srikanth_Gupta_</dc:creator>
      <dc:date>2021-06-18T21:11:13Z</dc:date>
    </item>
  </channel>
</rss>

