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 ;
相关推荐
eternityzzy 2020-07-19
zzjmay 2020-05-17
tugangkai 2020-05-09
genshengxiao 2020-06-26
victorzhzh 2020-06-16
taisenki 2020-05-27
archive 2020-07-30
成长之路 2020-07-28
taisenki 2020-07-05
tugangkai 2020-07-05
SignalDu 2020-07-05
zlsdmx 2020-07-05
tomson 2020-07-05
tugangkai 2020-07-04
tomson 2020-07-05
Zhangdragonfly 2020-06-28