有没有办法在 kusto 中获得类似于 Java 中的 foreach 循环的行为?例如,假设我有一个不同的服务列表 AF,那么对于这个不同的列表,我想为每个不同的列值取 N 行,有没有办法在单个查询中做到这一点?
我尝试了多种加入方式,但无法以动态方式使其发挥作用。我所说的动态是指我不想编写指定| where service = 'A' | take 30.
ServiceLogs
| where isnotempty( service)
| distinct service
| join kind = rightouter ServiceLogs on $left.service== $right.service
| take 30
Run Code Online (Sandbox Code Playgroud)
实际结果是它只为不同列表中的单个值返回 30,而不是每个值