<?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: How to set retention period for a delta table lower than the default period? Is it even possible? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25527#M17767</link>
    <description>&lt;P&gt;There are two ways:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Please set in cluster (Clusters -&amp;gt; edit -&amp;gt; Spark -&amp;gt; Spark config):&lt;/P&gt;&lt;P&gt;spark.databricks.delta.retentionDurationCheck.enabled false&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="imagen.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2017iCA797AD8D0153EBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="imagen.png" alt="imagen.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) or just before DeltaTable.forPath set (I think you need to change order in your code):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.conf.set("spark.databricks.delta.retentionDurationCheck.enabled", "false")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 15:56:16 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2022-03-15T15:56:16Z</dc:date>
    <item>
      <title>How to set retention period for a delta table lower than the default period? Is it even possible?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25526#M17766</link>
      <description>&lt;P&gt;I am trying to set retention period for a delta by using following commands.&lt;/P&gt;&lt;P&gt;deltaTable = DeltaTable.forPath(spark,delta_path)&lt;/P&gt;&lt;P&gt;spark.conf.set("spark.databricks.delta.retentionDurationCheck.enabled", "false")&lt;/P&gt;&lt;P&gt;deltaTable.logRetentionDuration&amp;nbsp;= "interval 1 days"&lt;/P&gt;&lt;P&gt;deltaTable.deletedFileRetentionDuration&amp;nbsp;= "interval 1 days"&lt;/P&gt;&lt;P&gt;These commands are not working for me, I mean, they aren't  removing any files for the given interval..where am I going wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 15:33:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25526#M17766</guid>
      <dc:creator>manasa</dc:creator>
      <dc:date>2022-03-15T15:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to set retention period for a delta table lower than the default period? Is it even possible?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25527#M17767</link>
      <description>&lt;P&gt;There are two ways:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Please set in cluster (Clusters -&amp;gt; edit -&amp;gt; Spark -&amp;gt; Spark config):&lt;/P&gt;&lt;P&gt;spark.databricks.delta.retentionDurationCheck.enabled false&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="imagen.png"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2017iCA797AD8D0153EBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="imagen.png" alt="imagen.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) or just before DeltaTable.forPath set (I think you need to change order in your code):&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;spark.conf.set("spark.databricks.delta.retentionDurationCheck.enabled", "false")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 15:56:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25527#M17767</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-03-15T15:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to set retention period for a delta table lower than the default period? Is it even possible?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25529#M17769</link>
      <description>&lt;P&gt;Hi @Hubert Dudek​&amp;nbsp;, thanks for you response!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 06:37:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25529#M17769</guid>
      <dc:creator>manasa</dc:creator>
      <dc:date>2022-03-17T06:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to set retention period for a delta table lower than the default period? Is it even possible?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25530#M17770</link>
      <description>&lt;P&gt;Hi @Kaniz Fatma​&amp;nbsp;,  Yes I was able to solve the issue! Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 06:39:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-set-retention-period-for-a-delta-table-lower-than-the/m-p/25530#M17770</guid>
      <dc:creator>manasa</dc:creator>
      <dc:date>2022-03-17T06:39:10Z</dc:date>
    </item>
  </channel>
</rss>

