如何正确定义和调用具有多列的表格类型参数的用户函数?
本页没有任何此类示例-https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/functions/user-defined-functions#features-目前用户定义的功能不支持的
为了给我的问题提供一些背景,这里是我尝试做这个
let foo=(T1:(col1:string, col2:string))
{
T1|count // something more complex will go here,
// so just avoiding the whole function is not an option.
}
someTable | summarize Res=foo(Col1, Col2) by Col3, Col4
Kusto承认我的功能,但抱怨它只接受一个论点。我怎样才能把两列传递给它呢?
谢谢,Dusan
这是不可能的,您不能调用用户定义的函数作为摘要函数,摘要函数列表由Kusto查询语言定义,目前无法扩展。
在查询中,接受表格输入的函数只能使用调用运算符调用