hadoop hdfs csv导入hive表

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 ; 

原文地址:https://www.cnblogs.com/SunshineKimi/p/12981335.html