2016-05-27 36 views
0

配置單元 - 從現有表創建外部表,如果無法完成...是否有解決方法。配置單元 - 從現有表創建外部表

我使用的蜂巢版本是:Hive 1.2.1000.2.4.2.0-258

,我想跑的東西如下查詢...

create external table table_1 
stored as orc 
location'wasb://[email protected]/output/table_1/' 
tblproperties ("orc.compress"="SNAPPY") 
as 
select * from table_0 limit 0; 

在cwiki他們作爲

解釋CTAS有這些限制:

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. 

複製下面的鏈接。 https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableAsSelect%28CTAS%29

謝謝:-)

+0

你上面的查詢運行時得到任何錯誤? – dheee

回答

0

還有另一種方式來創建一個蜂巢表like關鍵字

create table target_table like source_table; 
相關問題