Hive基本操作与建立与hbase的外关联表

[suser@prod ~]$ hive

Logging initialized using configuration in jar:file:/opt/cloudera/parcels/CDH-5.14.2-1.cdh5.14.2.p0.3/jars/hive-common-1.1.0-cdh5.14.2.jar!/hive-log4j.properties
WARNING: Hive CLI is deprecated and migration to Beeline is recommended.

hive> drop table tbl_hive_test;
create external table tbl_hive_test(id string,name string,age string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES("hbase.columns.mapping" = ":key,info:name,info:age")
TBLPROPERTIES("hbase.table.name" = "tbl_hive_test");

hive> select * from tbl_hbase_test;

猜你喜欢

转载自blog.csdn.net/wxs060524/article/details/80522681