hive hbase 映射表
来源:互联网 发布:层次聚类算法的优缺点 编辑:程序博客网 时间:2024/06/05 07:14
1)创建表
create 'hive_table','json'
2) 插入了数据如下
hbase(main):012:0> scan 'hive_htable'
ROW COLUMN+CELL1 column=json:age, timestamp=1512540521663, value=18
1 column=json:frend, timestamp=1512540630352, value=[{"relationship":1,"phone":"15******7","realName":"addr1"},{"relationship":11,"phone":"13********6","realName":"addr2"}]
1 column=json:name, timestamp=1512540375713, value=yinchunguang
3)创建hive表
create external table hbase_test (key string ,age string ,name string ,frend string) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,json:age,json:name,json:frend")TBLPROPERTIES ("hbase.table.name" = "hive_htable");
4) hive 查询
hive> select * from hbase_test;
OK
1 18 yinchunguang [{"relationship":1,"phone":"15835809207","realName":"addr1"},{"relationship":11,"phone":"13353588520","realName":"addr2"}]
到此可以进行hive sql on hbase了。
但是presto => hive 不能够从 这个表中查询数据。
重新create table table_rep as select * from hbase_test
tmp> select json_extract(json_array_get(frend,0), '$.phone') from table_rep;
- hbase 映射hive表
- Hive映射Hbase表
- hive hbase 映射表
- Hive映射已存在的HBase表
- Hbase Hive 整合映射
- 测试Hbase 表映射成 Hive表查询效率
- hive到hbase创建映射表以及添加数据
- hive 访问hbase表
- hive 访问hbase 表
- Hive整合HBase,操作HBase表
- Hive整合HBase,操作HBase表
- Hive整合HBase 通过Hive读/写HBase中的表
- Hive整合HBase 通过Hive读/写HBase中的表
- Hive整合HBase 通过Hive读/写HBase中的表
- Bulkload Hive表到HBase
- hive与hbase关联表
- hive集成管理Hbase表
- Hive-JSON 原始数据映射 Hive 表结构
- 主题模型(LDA)(一)--通俗理解与简单应用
- mui图片轮播ajax动态加载后不轮播
- Linux-VI编辑器
- 二维数组排序
- 微服务生态总结
- hive hbase 映射表
- websrvice 学习
- JavaScript中set,map,array,object用法比较
- java 直方圖 java對比
- mySql 事务控制和锁定语句
- CSDN 积分难求啊
- java 连接不上虚拟机redis
- java/Android开发环境搭建
- [openSUSE]Tumbleweed update sources