如何解决如何在Azure中使用Kusto划分计数数字?
我在Azure中有一个日志查询,看起来像这样:
table
| where timestamp > ago(30min)
| count
我想要的是将该计数除以一个数字,例如“ 5”。我在下面尝试了查询,但引发了异常。我该怎么办?
table
| where timestamp > ago(30min)
| count / 5
解决方法
您必须首先对其进行投影,因为count
是运算符,而不是像count()
这样的普通数字或函数:
requests
| where timestamp > ago(30min)
| count
| project Count / 5
另一种方法是使用count()
函数:
requests
| where timestamp > ago(30min)
| summarize count() / 5
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。