如何在 Kusto 中将控制命令与参数化查询相结合?
How to combine a control command with a parameterized query in Kusto?
根据这个 doc page 可以通过使用 $command_results
在查询中使用控制命令的结果。
现在,当查询使用 query_parameters 时如何实现?
.show tables;
declare query_parameters(_rootPath:string = "root")
$command_results
| where Folder startswith _rootPath
这抛出
400 - "General_BadRequest: Request is invalid and cannot be executed.
Syntax error: Query could not be parsed: SYN0002: A recognition error occurred. [line:position=3:0]
您在 declare query_parameters(_rootPath:string = "root")
之后缺少一个分号 (;
)
根据这个 doc page 可以通过使用 $command_results
在查询中使用控制命令的结果。
现在,当查询使用 query_parameters 时如何实现?
.show tables;
declare query_parameters(_rootPath:string = "root")
$command_results
| where Folder startswith _rootPath
这抛出
400 - "General_BadRequest: Request is invalid and cannot be executed.
Syntax error: Query could not be parsed: SYN0002: A recognition error occurred. [line:position=3:0]
您在 declare query_parameters(_rootPath:string = "root")
;
)