【问题标题】:Can I use tabular parameters in Kusto user-defined functions我可以在 Kusto 用户定义的函数中使用表格参数吗
【发布时间】:2018-11-06 16:14:27
【问题描述】:

基本上我想将一组字段值传递给一个函数,这样我就可以使用 in/!in 运算符。我希望能够使用先前查询的结果,而不是手动构造集合。

如:

let today = exception | where EventInfo_Time > ago(1d) | project exceptionMessage;
MyAnalyzeFunction(today)

那么 MyAnalyzeFunction 的签名是什么?

【问题讨论】:

    标签: azure-data-explorer kql


    【解决方案1】:

    见:https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions

    例如,以下将返回一个包含单个列 (y) 的表,其值为 23

    let someTable = range x from 2 to 10 step 1
    ;
    let F = (T:(x:long)) 
    {
        range y from 1 to 3 step 1
        | where y in (T)
    }
    ;
    F(someTable)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-10-26
      • 2014-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多