让a =(arg0:long){toscalar(Incidents | where IncidentId == arg0 | count)}; 范围idx从0到11步骤1 |扩展一个(idx)
我的kusto查询字符串就是这样,虽然很容易理解,但却无法正常工作。
答案 0 :(得分:0)
您遇到了用户定义函数的局限性,如此处所述: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions#restrictions-on-the-use-of-user-defined-functions
您应该可以通过执行以下操作(匹配您提供的示例)来实现您的目标:
let count_by_incident_id =
Incidents
| summarize count() by IncidentId
;
range idx from 0 to 11 step 1
| join hint.strategy = broadcast (count_by_incident_id)
on $left.idx == $right.IncidentId