<?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 Impact of VACUUM and retention settings on Delta Lake in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/impact-of-vacuum-and-retention-settings-on-delta-lake/m-p/124457#M47198</link>
    <description>&lt;P&gt;I have a table that needs to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;support time travel for up to 6 months&lt;/STRONG&gt;. To preserve the necessary metadata and data files, I’ve already configured the table with the following properties:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;ALTER&lt;/SPAN&gt; &lt;SPAN class=""&gt;TABLE&lt;/SPAN&gt; table_x &lt;SPAN class=""&gt;SET&lt;/SPAN&gt; TBLPROPERTIES ( &lt;SPAN class=""&gt;'delta.logRetentionDuration'&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;'interval 180 days'&lt;/SPAN&gt;, &lt;SPAN class=""&gt;'delta.deletedFileRetentionDuration'&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;'interval 180 days'&lt;/SPAN&gt; );&lt;/P&gt;&lt;P&gt;However, there are delta lake maintanance job which runs&lt;/P&gt;&lt;P&gt;VACUUM table_x RETAIN 720 HOURS; -- 30 days&lt;/P&gt;&lt;P&gt;Will running VACUUM table_x RETAIN 720 HOURS ignore the 180-day table properties and potentially delete files needed for time travel?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jul 2025 13:28:32 GMT</pubDate>
    <dc:creator>mjedy78</dc:creator>
    <dc:date>2025-07-08T13:28:32Z</dc:date>
    <item>
      <title>Impact of VACUUM and retention settings on Delta Lake</title>
      <link>https://community.databricks.com/t5/data-engineering/impact-of-vacuum-and-retention-settings-on-delta-lake/m-p/124457#M47198</link>
      <description>&lt;P&gt;I have a table that needs to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;support time travel for up to 6 months&lt;/STRONG&gt;. To preserve the necessary metadata and data files, I’ve already configured the table with the following properties:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;ALTER&lt;/SPAN&gt; &lt;SPAN class=""&gt;TABLE&lt;/SPAN&gt; table_x &lt;SPAN class=""&gt;SET&lt;/SPAN&gt; TBLPROPERTIES ( &lt;SPAN class=""&gt;'delta.logRetentionDuration'&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;'interval 180 days'&lt;/SPAN&gt;, &lt;SPAN class=""&gt;'delta.deletedFileRetentionDuration'&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;'interval 180 days'&lt;/SPAN&gt; );&lt;/P&gt;&lt;P&gt;However, there are delta lake maintanance job which runs&lt;/P&gt;&lt;P&gt;VACUUM table_x RETAIN 720 HOURS; -- 30 days&lt;/P&gt;&lt;P&gt;Will running VACUUM table_x RETAIN 720 HOURS ignore the 180-day table properties and potentially delete files needed for time travel?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jul 2025 13:28:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/impact-of-vacuum-and-retention-settings-on-delta-lake/m-p/124457#M47198</guid>
      <dc:creator>mjedy78</dc:creator>
      <dc:date>2025-07-08T13:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Impact of VACUUM and retention settings on Delta Lake</title>
      <link>https://community.databricks.com/t5/data-engineering/impact-of-vacuum-and-retention-settings-on-delta-lake/m-p/124536#M47221</link>
      <description>&lt;P&gt;Yes, the&amp;nbsp;&lt;SPAN&gt;VACUUM table_x RETAIN 720 HOURS;&amp;nbsp;&lt;/SPAN&gt; command will indeed override your table-level retention properties and potentially compromise your 6-month time travel capability.&amp;nbsp;&lt;BR /&gt;When you explicitly specify a retention period in the VACUUM command, it takes precedence over the table properties &lt;SPAN class=""&gt;'delta.deletedFileRetentionDuration'&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;and &lt;SPAN&gt;'delta.logRetentionDuration'&amp;nbsp;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;In your case, the maintenance job is enforcing a 30-day retention policy that conflicts with your 180-day table configuration.&amp;nbsp;The vacuum operation will remove data files older than 30 days that may still be referenced by transaction logs within your 180-day retention window.&lt;BR /&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 06:26:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/impact-of-vacuum-and-retention-settings-on-delta-lake/m-p/124536#M47221</guid>
      <dc:creator>intuz</dc:creator>
      <dc:date>2025-07-09T06:26:49Z</dc:date>
    </item>
  </channel>
</rss>

