【问题标题】:Pass in range operator columnName as paramater to a custom function in Kusto将范围运算符列名称作为参数传递给 Kusto 中的自定义函数
【发布时间】:2021-02-20 04:26:58
【问题描述】:

我正在尝试对存储在数组中的项目列表运行自定义函数,并且我正在查看 KQL 中的范围运算符。

这是我的代码:`

let myfunction = (lot:string){T|where id=lot}; 
                   union( range x from 1 to 50 step 1
                         |invoke myfunction(strcat("test-",x))
                   )

` 但我收到无法解析名为“x”的标量的失败消息。我想做的是重复 myfunction 50 次,然后使用 union 合并每次迭代的结果。如果这不能通过使用范围运算符来完成,是否有替代方法来实现我正在寻找的结果?

谢谢,

【问题讨论】:

    标签: azure-data-explorer kql


    【解决方案1】:

    您选择的方式不起作用,因为“invoke”运算符的输入是表格源,而函数返回表格输出。

    在 Kusto 中实现此目的的一种方法是使用 python plugin

    【讨论】:

      猜你喜欢
      • 2020-12-15
      • 1970-01-01
      • 2015-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多