检查为定义的时间窗口的阈值限制之间的值-KQL查询
我想在kusto中写一个查询,该查询检查汽车的速度是否始终介于一定速度限制之间(例如B/W 100和150 km/h)的窗口为5分钟。任何潜在客户均应高度赞赏。
以下数据集可以用作示例:
时间戳 | 速度 | 温度 |
---|---|---|
2022-01-01 00:01:00.0000000 | 142.5 | 25.5 |
2022-01-01-01 00:02:00.0000000 | 133.2 | 25.4 |
20222-01-01-01-01-01-01-01-01-01 00:0.00.00000000 | 000 | 124.8 |
25.6 2022222222222 -01-01 00:04:00.0000000 | 115.3 | 25.5 |
2022-01-01 00:05:00.0000000 | 98.4 | 25.4 |
2022-01-01 00:06:00.0000000 | 106.3 | 26.3 |
2022-01-01 00:07:00.0000000 | 119.6 | 26.5 |
2022-01 -01 00:08:00.0000000 | 134.7 | 25.4 |
2022-01-01 00:09:00.0000000 | 128.2 | 26.6 |
2022-01-01-01-01-01 00:10:00.0000000 | 137.5 | 25.5 25.5 |
11:00.00.00.00.00.00.00.00.00 000 139.99.927.9 27.4222222222222222222222222222222222222222222222222222 | 转 | 2022-022-01-01-01-01-01-01-01-01 |
: 00:12:00.0000000 | 140.1 | 26.3 |
2022-01-01 00:13:00.0000000 | 145.4 | 25.7 |
2022-01-01 00:14:00.0000000 | 158.7 | 24.4 |
2022-01-01 00:15:00.0000000 | 155.8 | 25.6 |
The desired result would be as follows :
时间戳 | 速度 | 温度 |
---|---|---|
2022-01-01 00:06:00.0000000 | 106.3 | 26.3 |
2022-01-01-01 00:07:00.0000000 | 119.6 | 26.5 |
2022-01-01-01-01-01 00:08:08:00.00.00.00.00.00.00 | 000 134.7 | 25.4 |
2022-22-2-22-01-01-09:0.0.0.00.0.0.0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.b00 00.00.b00 00:00.00.li | 128.2 | 26.6 |
2022-01-01 00:10:00.0000000 | 137.5 | 25.5 |
数据的第一个和最后5分钟被滤除,因为在那5分钟的窗口中,发现速度超出了100-150 km/h的范围。
I want to write a query in Kusto which checks if the speed of a car is ALWAYS between a certain speed limit (e.g. b/w 100 and 150 km/h) for a window of 5 mins. Any leads shall be highly appreciated.
The following dataset can be used as an example:
Timestamp | Speed | Temperature |
---|---|---|
2022-01-01 00:01:00.0000000 | 142.5 | 25.5 |
2022-01-01 00:02:00.0000000 | 133.2 | 25.4 |
2022-01-01 00:03:00.0000000 | 124.8 | 25.6 |
2022-01-01 00:04:00.0000000 | 115.3 | 25.5 |
2022-01-01 00:05:00.0000000 | 98.4 | 25.4 |
2022-01-01 00:06:00.0000000 | 106.3 | 26.3 |
2022-01-01 00:07:00.0000000 | 119.6 | 26.5 |
2022-01-01 00:08:00.0000000 | 134.7 | 25.4 |
2022-01-01 00:09:00.0000000 | 128.2 | 26.6 |
2022-01-01 00:10:00.0000000 | 137.5 | 25.5 |
2022-01-01 00:11:00.0000000 | 139.9 | 27.4 |
2022-01-01 00:12:00.0000000 | 140.1 | 26.3 |
2022-01-01 00:13:00.0000000 | 145.4 | 25.7 |
2022-01-01 00:14:00.0000000 | 158.7 | 24.4 |
2022-01-01 00:15:00.0000000 | 155.8 | 25.6 |
The desired result would be as follows:
Timestamp | Speed | Temperature |
---|---|---|
2022-01-01 00:06:00.0000000 | 106.3 | 26.3 |
2022-01-01 00:07:00.0000000 | 119.6 | 26.5 |
2022-01-01 00:08:00.0000000 | 134.7 | 25.4 |
2022-01-01 00:09:00.0000000 | 128.2 | 26.6 |
2022-01-01 00:10:00.0000000 | 137.5 | 25.5 |
The first and last 5 mins of the data are filtered out because in those 5 min windows the speed was found to be out of the 100 - 150 km/h range.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Fiddle