Kusto查询问题,带有标题关键字

问题描述 投票:0回答:1

我假设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
kusto kusto-query-language
1个回答
0
投票

因为title是该语言的保留关键字,所以您可以将c.title替换为c['title']

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

© www.soinside.com 2019 - 2024. All rights reserved.