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
数据导入
时间: 2024-10-14 19:26:13