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 ; 

hadoop hdfs csv导入hive表

 

相关文章:

  • 2021-11-07
  • 2021-05-21
  • 2021-12-26
  • 2022-12-23
  • 2021-09-22
  • 2021-11-24
  • 2021-07-11
  • 2021-06-25
猜你喜欢
  • 2022-12-23
  • 2021-06-30
  • 2022-01-10
  • 2021-08-23
  • 2021-07-12
  • 2021-12-25
相关资源
相似解决方案