invoke 运算符invoke operator

调用接收 invoke 的源作为表格参数自变量的 lambda。Invokes lambda that receives the source of invoke as tabular parameter argument.

T | invoke foo(param1, param2)


若要更详细地了解如何声明可接受表格参数的 lambda 表达式,请参阅 let 语句See let statements for more details on how to declare lambda expressions that can accept tabular arguments.


T | invoke function([ param1, param2 ])T | invoke function([ param1, param2 ])


  • T :表格源。T : The tabular source.
  • function:要计算的 lambda 表达式名称或函数名。function : The name of the lambda expression or function name to be evaluated.
  • param1、param2 ...:其他 lambda 参数。param1 , param2 ... : additional lambda arguments.


返回已计算的表达式的结果。Returns the result of the evaluated expression.


下面的示例演示如何使用 invoke 运算符来调用 lambda 表达式:The following example shows how to use invoke operator to call lambda expression:

// clipped_average(): calculates percentiles limits, and then makes another 
//                    pass over the data to calculate average with values inside the percentiles
let clipped_average = (T:(x: long), lowPercentile:double, upPercentile:double)
   let high = toscalar(T | summarize percentiles(x, upPercentile));
   let low = toscalar(T | summarize percentiles(x, lowPercentile));
   | where x > low and x < high
   | summarize avg(x) 
range x from 1 to 100 step 1
| invoke clipped_average(5, 99)