Hive - create an external table from an existing table
<p>Hive - create an external table from an existing table, if it can't be done... is there a work around.</p>

<p>The hive version I am using is : <code>Hive 1.2.1000.2.4.2.0-258</code></p>

<p>The query that I wanted to run is something as follows...</p>

<pre><code>create external table table_1
stored as orc
location'wasb://vnextdev@1vnextstorage.blob.core.windows.net/output/table_1/'
tblproperties ("orc.compress"="SNAPPY")
as 
select * from table_0 limit 0;
</code></pre>

<hr>

<p>At cwiki they explain as </p>

<p>CTAS has these restrictions:</p>

<pre><code>The target table cannot be a partitioned table.
The target table cannot be an external table.
The target table cannot be a list bucketing table.
</code></pre>

<p>Copying the link below.
<a href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableAsSelect%28CTAS%29" rel="nofollow">https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableAsSelect%28CTAS%29</a></p>

<p>Thank You :-)</p>