您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Hive外连HBase表

2025/6/11 19:41:29发布27次查看
hive外连hbase表 create [external] table [if not exists] table_name[(col_name data_type [comment col_comment], ...)][comm
hive外连hbase表
create [external] table [if not exists] table_name
[(col_name data_type [comment col_comment], ...)]
[comment table_comment]
[partitioned by (col_name data_type
[comment col_comment], ...)]
[clustered by (col_name, col_name, ...)
[sorted by (col_name [asc|desc], ...)]
into num_buckets buckets]
[row format row_format]
[stored as file_format]
[location hdfs_path]
连接hbase中已存在的表
create external table table_name(id int, value string)
stored by 'org.apache.hadoop.hive.hbase.hbasestoragehandler'
with serdeproperties (hbase.columns.mapping = :key,cf1:val)
tblproperties (hbase.table.name = xyz);
红色地方根据实际情况修改,绿色地方对应hbase表,,其中cf1代表列簇名,val代表列名,:key代表hbase的row赋予第一个字段,即上面例子中的红色标注的id。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product