我正在尝试设置ASA作业。我的用例是,我从现场的车辆接收遥测数据。它们传递车辆的各种属性。例如引擎当前正在开启或关闭
此数据进入IoT中心,然后ASA使用。
我的问题是输入顺序不正确。例如,在上图中,#9位于#8之前。
他是我的ASA查询
With AllSpeeder AS {
SELECT
telemetry.deviceId as vehicleid,
telemetry.enginestatus as currentenginestatus,
telemetry.datetime as currenttime,
Last(telemetry.containerdt) over (partition by telemetry.vehicleid limit duration(day,7)
when (telemetry.enginestatus = 'On2Off')) as engineontime
FROM
theiot
Timestamp by cast ( telemetry.containerdt as datetime)
where
telemetry.enginestatus = 'Off' or telemetry.enginestatus = 'On2Off'
}
SELECT * INTO theblob FROM AllSpeeder
但是上面的查询(TimeStamp by)没有解决它。