学习内容:数据导入,要求将CSV格式或者EXCEL格式的文件导入到HIVE数据仓库中;
①hive建表:test1
create table test1 (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;
②将/opt/module/data/路径下的文件test.csv导入表test1:
load data local inpath ‘/opt/module/data/test.csv‘ into table test1;
③查询表test1中所有数据;
select * from test1;
将CSV格式或者EXCEL格式的文件导入到HIVE数据仓库中
原文:https://www.cnblogs.com/zyj3955/p/15351022.html