<?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 Drop external hive table with data in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Drop-external-hive-table-with-data/m-p/202151#M164157</link>
    <description>&lt;P&gt;I have a lot of external table in my hive warhouse and I would to drop all these tables with data automatically.&lt;/P&gt;&lt;P&gt;how can I do this?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Apr 2018 18:56:23 GMT</pubDate>
    <dc:creator>sihi_yassine</dc:creator>
    <dc:date>2018-04-04T18:56:23Z</dc:date>
    <item>
      <title>Drop external hive table with data</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Drop-external-hive-table-with-data/m-p/202151#M164157</link>
      <description>&lt;P&gt;I have a lot of external table in my hive warhouse and I would to drop all these tables with data automatically.&lt;/P&gt;&lt;P&gt;how can I do this?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 18:56:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Drop-external-hive-table-with-data/m-p/202151#M164157</guid>
      <dc:creator>sihi_yassine</dc:creator>
      <dc:date>2018-04-04T18:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Drop external hive table with data</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Drop-external-hive-table-with-data/m-p/202152#M164158</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47200/sihiyassine.html" nodeid="47200"&gt;@Yassine&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;Do &lt;STRONG&gt;alter table on all tables&lt;/STRONG&gt; and change the &lt;STRONG&gt;external table to internal table&lt;/STRONG&gt; then drop the table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Write a script which can execute below statement for all the tables that are in warehouse directory&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; ALTER TABLE &amp;lt;table-name&amp;gt; SET TBLPROPERTIES('EXTERNAL'='False'); //changing the tbl properties to to make the table as internal&lt;/PRE&gt;
&lt;PRE&gt;hive&amp;gt; drop table &amp;lt;table-name&amp;gt;; //now the table is internal if you drop the table data will be dropped automatically.&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Apr 2018 19:31:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Drop-external-hive-table-with-data/m-p/202152#M164158</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-04-04T19:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Drop external hive table with data</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Drop-external-hive-table-with-data/m-p/202153#M164159</link>
      <description>&lt;P&gt;Awesome, works like a charm&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 20:11:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Drop-external-hive-table-with-data/m-p/202153#M164159</guid>
      <dc:creator>sihi_yassine</dc:creator>
      <dc:date>2018-04-04T20:11:13Z</dc:date>
    </item>
  </channel>
</rss>

