简体   繁体   中英

How to check for null Json propery in Azure Stream Analytics query?

We have an input stream of Json events from Event Hub in a following form:

 ...
 { "DeviceId": null, "ReportDateUtc": "2015-05-12T20:57:13.0000000Z", ... },
 { "DeviceId": "device123", "ReportDateUtc": "2015-05-12T20:57:13.0000000Z", ... }
 ...

When I test-run the following query, the output record count is 0:

SELECT
    *
FROM
    [events-input]
WHERE DeviceId IS NULL

Looks like Json nulls are not exactly SQL NULLs, so what would be the proper way to check for null values in a query?

There is a bug in the in-portal debugging experience where NULL values are not handled correctly. This will be fixed soon.

If you start actual job it will properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM