2021/9/10

1、将文件上传到Linux本地

2、启动hive服务,在hive下建表
create table lingshou_csv (InvoiceNo String,
StockCode String,
Description String,
Quantity String,
InvoiceDate String,
UnitPrice String,
CustomerID String,
Country String)
ROW format delimited fields terminated by ',' STORED AS TEXTFILE;


3、上传文件到hdfs
load data local inpath '/kkb/install/hive/lingshou.csv' into table lingshou_csv;

4、上传成功

5、查看表中前10条数据

select * from 表名 limit 10

posted @ 2021-09-10 23:31  小强哥in  阅读(24)  评论(0编辑  收藏  举报