我将以下Json输入从Eventhub传递到Stream Analytics。
{"meter_totalcycleenergy":null,"Test2": 20}, {"meter_totalcycleenergy":40,"Test2":20}
但是这项工作没有说明错误。
尝试写入1个事件时遇到错误:无法从“System.String”类型的属性“meter_totalcycleenergy”转换为“System.Single”类型的“meter_totalcycleenergy”列。
Error Image如何处理这种情况。
我认为Json nulls不完全是SQL NULL,那么在查询中检查空值的正确方法是什么?
meter_totalcycleenergy的数据类型在我的数据库中是浮点数。
你可以使用is not null
。例如:
select *
from input
where meter_totalcycleenergy is not null