如何查找 Kusto 中给定的 table 中是否存在对?

How to find if pair exists in a given table in Kusto?

对 KQL 相当陌生。我需要查找 table (T).

中是否存在某对关联值 (x,y)

我的想法是写这行:

let T =
...
...
...
DataTable
| where x, y in T

但是in运算符只接受一个参数作为输入,所以这是行不通的。我怎样才能只找到 T 中存在的 x,y 对?

如果我没理解错的话,我认为您正在寻找表之间的连接。以下对你有用吗? Return DataTable 中 x,y 存在于 T 中的所有记录。请注意,建议将较小的数据集放在联接的左侧,因此您可能希望根据数据集切换顺序。

let T = datatable(x:string, y:string)
[
    "A", "B" 
];
let DataTable = datatable(x:string, y:string, col1:long)
[
    "A", "B", 1,
    "C", "D", 2
];
T
| join kind=inner DataTable on x,y
| project-away x1, y1