<?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: unpersist doesn't clear in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/unpersist-doesn-t-clear/m-p/54446#M1911</link>
    <description>&lt;P&gt;Thank you so much for taking time and explaining the concepts&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2023 16:44:31 GMT</pubDate>
    <dc:creator>anandreddy23</dc:creator>
    <dc:date>2023-12-01T16:44:31Z</dc:date>
    <item>
      <title>unpersist doesn't clear</title>
      <link>https://community.databricks.com/t5/get-started-discussions/unpersist-doesn-t-clear/m-p/50570#M1711</link>
      <description>&lt;P&gt;from pyspark.sql import SparkSession&lt;BR /&gt;from pyspark import SparkContext, SparkConf&lt;BR /&gt;from pyspark.storagelevel import StorageLevel&lt;BR /&gt;spark = SparkSession.builder.appName('TEST').config('spark.ui.port','4098').enableHiveSupport().getOrCreate()&lt;/P&gt;&lt;P&gt;df4 = spark.sql(' \&lt;BR /&gt;select * from hive_schema.table_name limit 1')&lt;BR /&gt;print("query completed " )&lt;BR /&gt;df4.unpersist()&lt;BR /&gt;df4.count()&lt;/P&gt;&lt;P&gt;df4.show()&lt;/P&gt;&lt;P&gt;I have execute above code to&amp;nbsp; clear the dataframe release the memory. However, df4.show() still works and shows the data. Could you please help me with right method to free memory occupied by a spark DF please ?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 15:37:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/unpersist-doesn-t-clear/m-p/50570#M1711</guid>
      <dc:creator>anandreddy23</dc:creator>
      <dc:date>2023-11-07T15:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: unpersist doesn't clear</title>
      <link>https://community.databricks.com/t5/get-started-discussions/unpersist-doesn-t-clear/m-p/54446#M1911</link>
      <description>&lt;P&gt;Thank you so much for taking time and explaining the concepts&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 16:44:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/unpersist-doesn-t-clear/m-p/54446#M1911</guid>
      <dc:creator>anandreddy23</dc:creator>
      <dc:date>2023-12-01T16:44:31Z</dc:date>
    </item>
  </channel>
</rss>

