如何在 Azure 流分析查询中检查 null Json 属性?
How to check for null Json propery in Azure Stream Analytics query?
我们有来自事件中心的 Json 个事件的输入流,格式如下:
...
{ "DeviceId": null, "ReportDateUtc": "2015-05-12T20:57:13.0000000Z", ... },
{ "DeviceId": "device123", "ReportDateUtc": "2015-05-12T20:57:13.0000000Z", ... }
...
当我测试-运行以下查询时,输出记录数为0:
SELECT
*
FROM
[events-input]
WHERE DeviceId IS NULL
看起来 Json 空值不完全是 SQL 空值,那么在查询中检查空值的正确方法是什么?
门户内调试体验中存在错误,无法正确处理 NULL 值。这将很快得到解决。
如果你开始实际工作,它会正常。
我们有来自事件中心的 Json 个事件的输入流,格式如下:
...
{ "DeviceId": null, "ReportDateUtc": "2015-05-12T20:57:13.0000000Z", ... },
{ "DeviceId": "device123", "ReportDateUtc": "2015-05-12T20:57:13.0000000Z", ... }
...
当我测试-运行以下查询时,输出记录数为0:
SELECT
*
FROM
[events-input]
WHERE DeviceId IS NULL
看起来 Json 空值不完全是 SQL 空值,那么在查询中检查空值的正确方法是什么?
门户内调试体验中存在错误,无法正确处理 NULL 值。这将很快得到解决。
如果你开始实际工作,它会正常。