
我们已有Hbase表如下:
hbase(main):003:0> scan "zky"
ROWCOLUMN+CELL
row1column=f:age, timestamp=1526522780002,value=\x00\x00\x00\x1B

row1column=f:email, timestamp=1526522780002,value=zhangsan@qq.com
row1column=f:id, timestamp=1526522780002,value=11
row1column=f:name, timestamp=1526522780002,value=zhangsan
row1column=f:phone, timestamp=1526522780002,value=021-11111111

row2column=f:id, timestamp=1526522780137,value=2
row2column=f:name, timestamp=1526522780137,value=user2
row3column=f:id, timestamp=1526522780137,value=3
row3column=f:name,timestamp=1526522780137hive hbase关系,value=user3

row4column=f:id, timestamp=1526522780137,value=4
row4column=f:name, timestamp=1526522780137,value=user4
row5column=f:id, timestamp=1526522780469,value=7
5 row(s) in 0.9890 seconds

关联
hive和hbase关联(在Hive上构建外部表):
create external table hive_zky(key string,id int, name string,phone string) row format serde'org.apache.hadoop.hive.hbase.HBaseSerDe' stored by'org.apache.hadoop.hive.hbase.HBaseStorageHandler' withserdeproperties('hbase.columns.mapping'=':key,f:id,f:namehive hbase关系,f:phone')tblproperties('hbase.table.name'='zky');
必须指定Hbase的rowKey 为-->key String
如果想要在hive上看上表是怎样建立的可以使用show create table hive_zky;
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-139538-1.html
太完美了
何况当时中国是农业大国
中国发展迅速都是老百姓无形中的支持