2014-01-16 52 views
0

我們有表像波紋管蜂巢,如何修改配置單元表?

create external table caremanagermongo(
id int , 
cregiver_id int , 
patient_id int , 
caremanager_id int , 
provider_id int , 
is_active int , 
createddate timestamp , 
createdby String 
); 

如果我們需要通過添加

stored by "org.yong3.hive.mongo.MongoStorageHandler" 
with serdeproperties ("mongo.column.mapping" =  "id,cregiver_id,patient_id,caremanager_id,provider_id,is_active,createddate,createdby") 
tblproperties ("mongo.host" = "localhost", "mongo.port" = "27017", 
"mongo.db" = "careticker", "mongo.collection" = "caremanager") 

它是如何可能改變這個表,可以請你爲這個

回答

1

解決方案步驟1:當您創建外部表而不使用存儲的時,則它是 - 外部原生

第2步:您試圖通過以下方式對其進行更改:外部非本機。 (根據我的理解,這是不可能的)

根據我的理解,無法將本機轉換爲非本機。

順便說一下,ALTER TABLE尚不支持非本地表,按照該cwiki>蜂巢> storagehandlers

希望這有助於:)

+0

存儲處理程序與表相關聯時,它(意味着表)是通過新的STORED BY子句創建的。所以創建單一鏡頭的非本機外部表。有用。 –