如何在in
条件语句中使用表格类型?请参阅下面的第二个查询中的最后一个条件:Computer in clusterNodes
。我收到以下语法错误:
无法在第[9,181]行的'in'处解析查询
令牌:行中:9位:181
let clusterNodes =
KubeNodeInventory
| where TimeGenerated > ago(7d)
| where ClusterName == "test-aks"
| distinct Computer;
Perf
| where TimeGenerated > ago(1d)
| where CounterName == "cpuUsageNanoCores" and ObjectName == "K8SNode" and Computer in clusterNodes
| summarize ValueAvg = avg(CounterValue) by Time = bin(TimeGenerated, 15m), Counter = CounterName
| project round(ValueAvg / 1000000000, 2), Time, Counter
| render timechart;
答案 0 :(得分:0)
在这种情况下,以下应该有助于利用 :
| where … and Computer in (clusterNodes)
P.S。您可能还需要删除 let 与查询的其余部分之间的空白行(取决于您在UI中选择要执行的查询的方式)。