你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
invoke operator
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Invokes a lambda expression that receives the source of invoke
as a tabular argument.
Note
For more information on how to declare lambda expressions that can accept tabular arguments, see let statements.
Syntax
T | invoke
function(
[param1,
param2])
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
T | string |
✔️ | The tabular source. |
function | string |
✔️ | The name of the lambda let expression or stored function name to be evaluated. |
param1, param2 ... | string |
Any additional lambda arguments to pass to the function. |
Returns
Returns the result of the evaluated expression.
Example
The following example shows how to use the invoke
operator to call lambda let
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));
T
| where x > low and x < high
| summarize avg(x)
};
range x from 1 to 100 step 1
| invoke clipped_average(5, 99)
Output
avg_x |
---|
52 |