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

hadoop学习之hive

时间:2017-03-02 16:57:58      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:dia   hive   orm   建表   string   导入   运行时   销售部   img   

1.介绍:hive:数据仓库 解释器,编译器,优化器等

hive的命令整理http://blog.csdn.net/xiaoping8411/article/details/7605039

hive运行时,元数据存储在关系型数据库里面

需要安装一个关系型数据库(mysql)

 

2:hive创建表例子:

create table t_emp(
id int,
name string,
age int,
dept_name string
)
row format delimited
fields terminated by ‘,‘;

1,张三,33,销售部
2,张四,34,销售部
3,张唔,35,销售部
4,张六,36,销售部

select count(*) from t_emp where dept_name = ‘销售部‘ group by dept_name;

-----------------------------
create table t_person(
id int,
name string,
like array<string>,
tedian map<string,string>
)
row format delimited
fields terminated by ‘,‘

collection items terminated by ‘_‘

map keys terminated by ‘:‘;

1,zhangsan,sports_books_TV,sex:male_color:red

 

数据导入

技术分享

 

hadoop学习之hive

标签:dia   hive   orm   建表   string   导入   运行时   销售部   img   

原文地址:http://www.cnblogs.com/tomtao/p/6392140.html

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