我試圖在蜂巢中創建表,但獲取下面提到的錯誤。任何人都可以幫助我解決問題嗎?蜂巢創建外部表
CREATE EXTERNAL TABLE IF NOT EXISTS flightInfo2008
(Year INT,
Month INT,
DayofMonth INT,
DayOfWeek INT,
DepTime INT,
CRSDepTime INT,
ArrTime INT,
CRSArrTime INT,
UniqueCarrier STRING,
FlightNum INT,
TailNum STRING,
ActualElapsedTime INT,
CRSElapsedTime INT,
AirTime INT,
ArrDelay INT,
DepDelay INT,
Origin STRING,
Dest STRING,
Distance INT,
TaxiIn INT,
TaxiOut INT,
Cancelled INT,
CancellationCode INT,
Diverted INT,
CarrierDelay INT,
WeatherDelay INT,
NASDelay INT,
SecurityDelay INT,
LateAircraftDelay INT)
COMMENT 'mydb flightInfo2008'
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ';'
STORED AS TEXTFILE
LOCATION '/user/hadoop/mydata';
FAILED: ParseException line 15:10 cannot recognize input near ',' 'ArrDelay' 'INT' in column type
hive>
它似乎沒問題,你可以看看你的腳本來檢查你是否看到一些特殊字符。此外,請嘗試更改年份和月份的名稱,這些名稱中包含udfs,可能配置單元對異常並不十分清楚。你使用的是什麼Hive版本? – hlagos
檢查TAB符號並將它們替換爲空格 – leftjoin
@lake我已更改年份和月份,但它仍然無法正常工作,我正在使用Hive 1.2.1版本。 – mia