<?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>question Deleting External Table Partition Data: Switching TBLPROPERTIES to Internal in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145201#M254385</link>
    <description>&lt;P&gt;I have an external table which is created with partitions and i would like to delete/drop few partition along with data as i no longer require it.&lt;/P&gt;
&lt;P&gt;Appreciate any suggestions.&lt;/P&gt;</description>
    <pubDate>Tue, 12 May 2026 20:57:09 GMT</pubDate>
    <dc:creator>PentaReddy</dc:creator>
    <dc:date>2026-05-12T20:57:09Z</dc:date>
    <item>
      <title>Deleting External Table Partition Data: Switching TBLPROPERTIES to Internal</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145201#M254385</link>
      <description>&lt;P&gt;I have an external table which is created with partitions and i would like to delete/drop few partition along with data as i no longer require it.&lt;/P&gt;
&lt;P&gt;Appreciate any suggestions.&lt;/P&gt;</description>
      <pubDate>Tue, 12 May 2026 20:57:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145201#M254385</guid>
      <dc:creator>PentaReddy</dc:creator>
      <dc:date>2026-05-12T20:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete/drop a partition of an external table along with data</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145202#M254386</link>
      <description>&lt;P&gt;@Reddy&lt;/P&gt;&lt;P&gt;Because it is an external table there is no one-liner to do it. That is probably the whole point of having external tables&lt;/P&gt;&lt;P&gt;So you need to do&lt;/P&gt;&lt;PRE&gt;ALTER TABLE some.table DROP PARTITION (part="some") PURGE;
&lt;/PRE&gt;&lt;P&gt;and &lt;/P&gt;&lt;PRE&gt;hdfs dfs -rm -R /path/to/table/basedir
&lt;/PRE&gt;&lt;P&gt;I put the 'PURGE' in there intentionally. It would work for non-external tables, but just not for external tables.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 21:42:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145202#M254386</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2017-01-25T21:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete/drop a partition of an external table along with data</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145203#M254387</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14949/reddyppr.html" nodeid="14949"&gt;@Reddy&lt;/A&gt; Please don't forget to mark the question as answered if it is answered.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 16:38:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145203#M254387</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2017-01-27T16:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete/drop a partition of an external table along with data</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145204#M254388</link>
      <description>&lt;P&gt;Here is work around, which i have implemented.&lt;/P&gt;&lt;P&gt;For an external table, If you are trying to drop a partition and as-well would like to delete  the data. This can be achieved as below.&lt;/P&gt;&lt;P&gt;1. Alter external table as internal table -- by changing the TBL properties as external =false&lt;/P&gt;&lt;P&gt;2. Drop the partitions -- when you drop the partitions, data pertained to the partitions will also be dropped as now this table is managed table &lt;/P&gt;&lt;P&gt;3. Alter back the table as external=True.&lt;/P&gt;&lt;P&gt;By doing this, there more controlled on what we are deleting and drop the partitions rather than using hadoop rm command&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 13:56:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Deleting-External-Table-Partition-Data-Switching/m-p/145204#M254388</guid>
      <dc:creator>PentaReddy</dc:creator>
      <dc:date>2017-02-08T13:56:52Z</dc:date>
    </item>
  </channel>
</rss>

