hive 快速插入测试数据
vi /root/data.txt 1,sss 2,dfdf 3,dfdf 4,changqun
data.txt中不要有空行,空行也是一条数据. $ hive 创建一个表 hive>create table test(id int,name string) row format delimited fields terminated by ','; 加载数据 hive>LOAD DATA LOCAL INPATH '/root/data.txt' OVERWRITE INTO TABLE test;
查询即可看到结果 hive> select * from test; OK 1 sss 2 dfdf 3 dfdf 4 changqun Time taken: 2.701 seconds