archive 2020-05-28
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 ;