码迷,mamicode.com
首页 > 其他好文 > 详细

Hive

时间:2015-07-29 21:09:46      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:

show databases;

show tables;

use zzz;//使用一个database;

create table wyp
(id int, name string,
age int, tel string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ‘\t‘
STORED AS TEXTFILE;

load data local inpath ‘wyp.txt‘ into table wyp;//数据直接rz即可

load data inpath ‘/user/root/wyp.txt‘ into table wyp;//文件在hdfs中

select * from wyp;

 

Hive

标签:

原文地址:http://www.cnblogs.com/sifaqingyun/p/4687189.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!