<?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: Is there a Python API for vacuum with dry run? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/is-there-a-python-api-for-vacuum-with-dry-run/m-p/4042#M877</link>
    <description>&lt;P&gt;Equivalent of sql command "VACUUM &amp;lt;table_name&amp;gt; RETAIN 500 HOURS DRY RUN;" in python is spark.sql("VACUUM &amp;lt;table_name&amp;gt; RETAIN 500 HOURS DRY RUN;")&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2023 16:18:10 GMT</pubDate>
    <dc:creator>venkatcrc</dc:creator>
    <dc:date>2023-05-24T16:18:10Z</dc:date>
    <item>
      <title>Is there a Python API for vacuum with dry run?</title>
      <link>https://community.databricks.com/t5/data-engineering/is-there-a-python-api-for-vacuum-with-dry-run/m-p/4041#M876</link>
      <description>&lt;P&gt;I have the below sql command where i am doing a dry run with vacuum. &lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
VACUUM &amp;lt;table_name&amp;gt; RETAIN 500 HOURS DRY RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;wanted to check if there is a way to achieve this in python api?&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I​ tried the below. But, not sure if there is a parameter that we can pass for dry run?&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;from delta.tables import DeltaTable
&amp;nbsp;
path = "path/to/delta_table"
dt = DeltaTable(spark, path)
&amp;nbsp;
vacuum_out = dt.vacuum(retentionHours=500)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;L​ike retention hours do we have a parameter for dry run?&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;If it's not possible through python api, is there a pyspark sql equivalent of this ?&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Thank you​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 01:01:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/is-there-a-python-api-for-vacuum-with-dry-run/m-p/4041#M876</guid>
      <dc:creator>Shankar</dc:creator>
      <dc:date>2023-05-24T01:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a Python API for vacuum with dry run?</title>
      <link>https://community.databricks.com/t5/data-engineering/is-there-a-python-api-for-vacuum-with-dry-run/m-p/4042#M877</link>
      <description>&lt;P&gt;Equivalent of sql command "VACUUM &amp;lt;table_name&amp;gt; RETAIN 500 HOURS DRY RUN;" in python is spark.sql("VACUUM &amp;lt;table_name&amp;gt; RETAIN 500 HOURS DRY RUN;")&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 16:18:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/is-there-a-python-api-for-vacuum-with-dry-run/m-p/4042#M877</guid>
      <dc:creator>venkatcrc</dc:creator>
      <dc:date>2023-05-24T16:18:10Z</dc:date>
    </item>
  </channel>
</rss>

