Azure KUSTO 语句失败并显示“未找到表格语句”

jps*_*sti 1 kql azure-data-explorer

有人能告诉我为什么 Log Analytics 中的这个 Kusto 语句失败并显示“找不到表格语句”吗?

let eventcnt = Event
| where TimeGenerated > ago(10m)
Run Code Online (Sandbox Code Playgroud)

我可以运行这个查询并返回一个数据表:

Event
| where TimeGenerated > ago(10m)
Run Code Online (Sandbox Code Playgroud)

Rac*_*hel 7

当变量声明和使用之间存在空行时,App Insights 日志资源管理器给了我此错误。

作品

let eventcnt = Event
| where TimeGenerated > ago(10m);
eventcnt
Run Code Online (Sandbox Code Playgroud)

不起作用

let eventcnt = Event
| where TimeGenerated > ago(10m);

eventcnt
Run Code Online (Sandbox Code Playgroud)

  • 谢谢!您节省了大量故障排除时间。 (2认同)

Yon*_*i L 6

RE:你的第一个代码片段:就像你在你的程序中定义了一个函数,但你实际上并没有在你的程序中做任何其他事情(并且你没有在你的程序中调用那个函数)。

它与同一let语句和查询:如果你想使用你刚才定义的东西,你需要把它列入您的查询。例如:

let eventcnt = Event
| where TimeGenerated > ago(10m);
eventcnt
Run Code Online (Sandbox Code Playgroud)