Azure流分析和事件顺序

时间:2018-10-20 07:26:51

标签: azure azure-stream-analytics

我正在尝试设置ASA作业。我的用例是,我从现场的车辆接收遥测数据。它们传递车辆的各种属性。例如引擎当前正在开启或关闭

enter image description here

此数据进入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)没有解决它。

我在ASA中尝试了事件顺序,但上述8和9仍未重新排序。 enter image description here

0 个答案:

没有答案