【问题标题】:Kusto query issue with title keyword标题关键字的 Kusto 查询问题
【发布时间】:2020-06-16 23:29:35
【问题描述】:

我假设title 可能是保留字或类似的字,但下面的查询拒绝围绕c.title 进行解析。不确定查询本身到底有什么问题

AzureActivity
| where CategoryValue == "ResourceHealth" and ResourceProviderValue == "MICROSOFT.COMPUTE"
| where not (ResourceGroup startswith "DATABRICKS-RG")
| extend d=parse_json(Properties)
| extend c = parse_json(tostring(d.eventProperties))
| where c.cause == "PlatformInitiated" and not(c.title == "Live Migration")

显示错误

 SYNTAX ERROR

Query could not be parsed at '.' on line [6,48]

Token: .
Line: 6
Position: 48

If issue persists, please open a support ticket.

Request id: 6a4d4bae-41f6-43b4-9657-55fc435acab9

【问题讨论】:

    标签: azure-data-explorer kql


    【解决方案1】:

    由于title是语言中的保留关键字,您可以将c.title替换为c['title']

    见:https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/dynamic#dynamic-object-accessors

    【讨论】:

    • 是否有保留关键字的列表记录在某处?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-08
    • 1970-01-01
    • 2011-03-16
    • 1970-01-01
    相关资源
    最近更新 更多