2016-05-25 16 views
4

私は読み込みエラーCSVデータ

create table event_history(status tinyint, condition smallint, 
machine_id int, time timestamp, ident int, state tinyint) 

その後、私は、次のコマンドを使用して、ハイブのテーブルを作成したCSV次の形式の行を持つファイル、

1, 11812, 15273, "2016-05-22T111647.800 US/Eastern", 82971850, 0 
1, 11812, 7445, "2016-05-22T113640.200 US/Eastern", 82971928, 0 
1, 11654, 322, "2016-05-22T113845.773 US/Eastern", 82971934, 0 
1, 11722, 0, "2016-05-22T113929.541 US/Eastern", 82971940, 0 

ザ・を、持っています私は、次のコマンドでテーブルにCSVファイルをロードしようとしています

load data local inpath "/home/ubuntu/events.csv" into table event_history; 

しかし、私が得るのは、選択をしようとするとNULLsです作成されたテーブルのクエリ。私はここで何が欠けていますか?

ハイブのバージョンがハイブ1.2.1

答えて

8

私のエラーは、テーブルの作成にあったあります。以下の変更で修正されました

create table event_history(status tinyint, condition smallint, machine_id int, 
time timestamp, drqs int, state tinyint) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','; 
関連する問題