create table toys.test (id int, x0 double, x1 double, x2 double, x3 double) row format delimited fields terminated by ',' stored as textfile;
先在hive 數據庫toys創建表test,注意行分割符號為,逗號
上傳本地數據到hdfs
hadoop fs -put /data/projects/breast.csv /data/projects/breast.csv
hdfs上傳到hive
LOAD DATA INPATH '/data/projects/breast.csv' overwrite into table toys.test ;