云日志服务 LTS-字符串函数:split_to_map函数

时间:2025-02-12 15:14:37

split_to_map函数

使用指定的第一个分隔符拆分字符串,然后使用指定的第二个分隔符第二次拆分字符串。返回第二次拆分后的结果。

语法:split_to_map(str, splitStr1, splitStr2)

表26 参数说明

参数名称

描述

类型

是否必选

str

原始字符串。

String

splitStr1

分隔符1。

String

splitStr2

分隔符2。

String

返回值类型:ARRAY类型

示例:SELECT SPLIT_TO_MAP('upstream_response_time:123, request_time:456', ',', ':')

表27 查询分析结果

类型

场景

查询语句

SPLIT_TO_MAP('upstream_response_time:123, request_time:456', ',', ':')

返回结果

{" request_time":"456","upstream_response_time":"123"}

support.huaweicloud.com/usermanual-lts/lts_07_0205.html