我創建了下表中配置單元:INSERT表蜂巢
hive> CREATE TABLE IF NOT EXISTS Sensorreading (recvtime String, nodeid int, sensorid int, systemid int, value float);
OK
Time taken: 3.007 seconds
hive> describe Sensorreading;
OK
recvtime string
nodeid int
sensorid int
systemid int
value float
Time taken: 0.381 seconds
hive>
現在我需要在裏面插入數據。我曾經試過,但它不工作:
INSERT INTO TABLE Sensorreading (recvtime, nodeid, sensorid, systemid, value) VALUES ('2015-05-29 11:10:00',1,1,1,-45.4);
如何是INSERT的語法?由於
[[email protected]〜] $ hive version 使用jar中的配置初始化日誌記錄:file:/usr/local/hive-0.9.0-shark-0.8.0-bin/lib/hive-common -0.9.0-shark-0.8.0.jar!/hive-log4j.properties – Cristina
然後,命令INSERT的語法是什麼? – Cristina
看來你的版本是0.9.0。您可以將這些文件加載到配置單元表中,或者您可以從查詢中插入配置單元表。更多信息在[link](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Writingdataint files fromqueries) – sras