Kusto 在另一个查询中使用列表中的每个值

问题描述 投票:0回答:0

我有一个表 - table1,其中包含字符串类型的“消息”列和日期时间类型的“时间戳”列。从表 1 中,我需要获取过去 1 天内具有特定消息的所有日志的时间戳。对于此列表中的每个时间戳,我需要在 table1 中找到第一条日志,该日志的时间戳大于此时间戳,在该时间戳的 10 分钟内并具有特定消息。

这是我目前所拥有的:

let table1_timestamps = table1
| where Timestamp > ago(1d)
| where Message == "Sample message"
| summarize make_list(Timestamp);

现在,对于 table1_timestamps 中的每个值,我想运行以下查询:

table1
| where Timestamp between (<timestamp in table1_timestamps> .. 10m)
| where Message == "Different message"
| arg_min(Timestamp)

我怎样才能做到这一点?

kql kusto-explorer
© www.soinside.com 2019 - 2024. All rights reserved.