【发布时间】:2020-12-15 17:03:59
【问题描述】:
所以我有一个这样的 Kusto 查询
exceptions
| extend A_= tostring(customDimensions.A)
| where A_ in~ ("Could not get notes: From:", "failed to call", "Custom conference list" )
// | where A_ contains 'Could not get notes: From:' //This is working when I use "contains" operator but fails to check below 2 items when the first item doesn't exist
// | where A_ contains 'Custom conference list'
// | where A_ contains 'failed to call'
列表中的第一项是“Could not get notes: From:”,其中字符串末尾有多个 ID
例如;
无法获取注释:来自:abcd
无法获取注释:来自:abcdef
我要做的是获取所有以“无法获取注释:来自:”开头的项目,并在“in~”运算符中使用它们。
到目前为止,我已经尝试过使用如下所示的包含运算符
|where A_ contains 'Could not get notes: From:' // This seems to be working as it will outputting every item that starts with "Could not get notes: From:" but when I am trying to use it in the "in~" it is failing.
对每个唯一项目使用“包含”运算符的问题是,如果任何项目(比如 3 个项目)不存在,即使 2 个项目仍然存在,查询也不返回任何结果。
不确定这是否有更好的解决方案。
【问题讨论】:
标签: azure-log-analytics azure-data-explorer kql