doris/starrocks on ES

在doris/starrocks中创建外部表


USE simon;
CREATE EXTERNAL TABLE `soe_t1` (
`k1` bigint(20) NULL COMMENT "",
`k2` datetime NULL COMMENT "",
`k3` varchar(20) NULL COMMENT "",
`k4` varchar(100) NULL COMMENT "",
`k5` float NULL COMMENT ""
) ENGINE=ELASTICSEARCH
COMMENT "ELASTICSEARCH"
PROPERTIES (
"hosts" = "cs02:9200", -- 这里写集群地址
"index" = "test",

"user" = "user",
"password" = "password"

--下面几个可以不要
"transport" = "http",
"enable_docvalue_scan" = "true",
"max_docvalue_fields" = "20",
"enable_keyword_sniff" = "true"

);

--然后点等几秒就可以查询了

posted @ 2023-06-05 15:43  再见傅里叶  阅读(153)  评论(0编辑  收藏  举报