在 KUSTO 中找到 3 个候选列中的非空列并扩展为新列

In KUSTO find the not empty columns out of 3 candidates and extend as new column

如果我的信息(条件不为空)在 NAME1、NAME2 或 NAME3 中,我希望每次 entry/line 查找。

我想找到一种比双嵌套 iff 更短、更优雅的方法:

.....
|extend name= iff(isempty(NAME1) == false,  NAME1,  iff(isempty(NAME2) == false,  NAME2, NAME3))

假设您的意思是 isnotempty() 而不是 isempty(),那么您可以使用 coalesce() 函数:https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/coalescefunction

例如 - 以下查询结果中 d 列下的值为 'hello'

print a = '', b = '', c = 'hello'
| project d = coalesce(a, b, c)