如何通过调用 Kusto 中的函数将分区用于 运行 子查询?

How to use partition to run a subquery by calling a function in Kusto?

如何通过调用函数并将值作为参数来使用 partition 运行 子查询?

range day from 1 to 50 step 1
| partition by day
{
   function_call(day)  
}

那是行不通的,但是如果我输入一个常量

range day from 1 to 50 step 1
| partition by day
{
   function_call(10)  
}

然后它会工作,但它变成了具有相同参数的函数调用的联合,虽然不是我想要的......

请查看 user-defined functions usage restrictions,特别是 #1-2(假设我猜对了你的函数 function_call() 的作用):

  1. User-defined functions can't pass into toscalar() invocation information that depends on the row-context in which the function is called.
  2. User-defined functions that return a tabular expression can't be invoked with an argument that varies with the row context.
  3. A function taking at least one tabular input can't be invoked on a remote cluster.
  4. A scalar function can't be invoked on a remote cluster.

根据您的功能,function_call(),您可以通过不同的方式实现您的目标。但是如果您需要进一步的帮助,您需要指定该函数的逻辑。