11.21周总结
1.本周所学内容:
(1) HBase,Hive学习
2.代码行数: 300行
3.所用时间: 4h
9. Hive
9.1 启动
/usr/local/hive/bin/hive
9.2 基本操作
(1) 创建表
create external table minhang
(
day_id STRING,
sale_nbr STRING,
buy_nbr STRING,
cnt STRING,
round STRING
)
row format delimited fields terminated by ','
stored as textfile
location '/mymapreduce/in/minhang'
(2) 计算表总数据
select count(*) from bigdata_user;
select
sale_nbr,cnt,round
from minhang
where(sale_nbr like '%O%');