hive 版本1.2.1
es 版本5.5.0
hadoop-es-5.5.0.jar
创建hive表如下
CREATE EXTERNAL TABLE es_test5(
id string,
uid string,
wb_name string,
platform string,
release_time timestamp
)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES(
'es.nodes' = '192.168.17.111, 192.168.17.121',
'es.index.auto.create' = 'false',
'es.resource' = 'datamonthly',
'es.read.metadata' = 'true',
'es.mapping.names' = 'id:_metadata._id, uid:UID');
es 版本5.5.0
hadoop-es-5.5.0.jar
创建hive表如下
CREATE EXTERNAL TABLE es_test5(
id string,
uid string,
wb_name string,
platform string,
release_time timestamp
)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES(
'es.nodes' = '192.168.17.111, 192.168.17.121',
'es.index.auto.create' = 'false',
'es.resource' = 'datamonthly',
'es.read.metadata' = 'true',
'es.mapping.names' = 'id:_metadata._id, uid:UID');
0 个回复