ITeye博客

hive 快速插入测试数据

chenchangqun · 2014-05-20 17:52 · 开源软件 · Markdown

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。