【详述】创建ES外表查询报错
【StarRocks版本】例如:2.3.4
【问题描述】:es版本信息
{
“name”: “xxxxxx”,
“cluster_name”: “hlht-log”,
“cluster_uuid”: “OxiTGKDPSSSwl-4UkU6dvw”,
“version”: {
“number”: “6.8.0”,
“build_flavor”: “default”,
“build_type”: “docker”,
“build_hash”: “65b6179”,
“build_date”: “2019-05-15T20:06:13.172855Z”,
“build_snapshot”: false,
“lucene_version”: “7.7.0”,
“minimum_wire_compatibility_version”: “5.6.0”,
“minimum_index_compatibility_version”: “5.0.0”
},
“tagline”: “You Know, for Search”
}
创建es外表语句
CREATE EXTERNAL TABLE hdop.es_matomo_visit_log
(
visitTimestamp date ,
BrowserEngine VARCHAR (65535),
BrowserEngineVersion VARCHAR (65535),
BrowserName VARCHAR (65535),
BrowserVersion VARCHAR (65535),
Ua VARCHAR (65535)
)
ENGINE=ELASTICSEARCH
PARTITION BY RANGE (visitTimestamp)
()
PROPERTIES
(
“hosts” = “http://xxxxxxx:9200”,
“user” = “elastic”,
“password” = “xxxxxx”,
“index” = “matomo_visit_log_ialias”,
“type” = “_doc”
);
返回错误:SQL 错误 [1064] [42000]: fetch es table [es_matomo_visit_log] metadata failure: index[matomo_visit_log_ialias] type[_doc] mapping not found for the ES Cluster