【问题标题】:Kusto range function Semantic error: '' has the following semantic error: Unresolved reference binding:XXX"Kusto 范围函数语义错误:“”有以下语义错误:未解析的引用绑定:XXX”
【发布时间】:2019-04-03 06:48:11
【问题描述】:
let a = (arg0:long) {
    toscalar(
        Incidents
        | where IncidentId == arg0 
        | count)
};
range idx from 0 to 11 step 1 
| extend a(idx)

我的kusto查询字符串就是这样,通俗易懂,但是不行。

【问题讨论】:

    标签: azure-data-explorer kql


    【解决方案1】:

    您遇到了用户定义函数的限制,如下所示: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions#restrictions-on-the-use-of-user-defined-functions

    您应该能够通过执行以下操作来实现您的目标(与您提供的示例相匹配):

    let count_by_incident_id = 
        Incidents 
        | summarize count() by IncidentId
    ;
    range idx from 0 to 11 step 1
    | join hint.strategy = broadcast (count_by_incident_id)
        on $left.idx == $right.IncidentId
    

    【讨论】:

    猜你喜欢
    • 2023-01-20
    • 1970-01-01
    • 2017-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-13
    • 1970-01-01
    相关资源
    最近更新 更多