【问题标题】:How to check for null Json propery in Azure Stream Analytics query?如何在 Azure 流分析查询中检查 null Json 属性?
【发布时间】:2015-05-18 18:03:59
【问题描述】:

我们有一个来自事件中心的 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 空值,那么在查询中检查空值的正确方法是什么?

【问题讨论】:

    标签: sql json azure-stream-analytics cortana-intelligence


    【解决方案1】:

    门户内调试体验中存在一个错误,即未正确处理 NULL 值。这将很快得到解决。

    如果你开始实际工作,它会正常的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多