azure - Azure Log Analytics - 加入失败 - 数据类型不一致
问题描述
我对 Azure 和查询语言非常陌生。我创建了一些似乎有效的警报和查询,但我试图每小时扫描一次以查找特定的 http 错误,并用描述和代码显示它们。
我使用了数据表的连接,但是当我运行查询时,连接失败。
Inconsistent data types for the join keys (responseCode_d, responseCode_d) (R64, I32)
responseCode_d 是根据 Azure Analytics 查询架构的数字,我在数据表中将其声明为整数。 responseCode_d 架构
下面是查询。
let codes = datatable(responseCode_d:int, description:string)
[ 400, "Endpoint - Not found",
500, "Internal server error",
415, "Unsupported Media"
];
AzureDiagnostics
| join kind = inner
codes on responseCode_d
| where responseCode_d == 500 or responseCode_d == 415 or responseCode_d == 400
| where TimeGenerated >= ago(1h)
| summarize count(responseCode_d) by description
解决方案
错误消息给出了提示。(R64, I32) 表列类型 (R64) 与您为表 responseCode_d:int (I32) 指定的类型不匹配。
将数据表(responseCode_d:int,description:string)更改为数据表(responseCode_d:double,description:string)
推荐阅读
- python - 如何在 Odoo v12 中将数据从销售订单行发送到发票行?
- java - Java 无法解析的日期异常
- angular - 如何从组件访问正文
- c# - 为什么我不能在带有 inline { get; 的变量之前使用 [Space(15)] 放; }?
- c - 如何使用 CMake 将我的库与 czmq 链接
- tensorflow - 我们如何裁剪派生变量,以便相应地裁剪可训练值的值
- python - 如何使用 python 在 aws s3 预签名的 url 中隐藏我的访问密钥
- html - 滑块在页面中未正确呈现
- python - 如何将调查的答案存储在 python 数据框中
- ios - 为什么使用情节提要在 UIScrollView 中不显示内容