0

I try to use Azure stream analytics to filter results that are too far from the last 2 reads. However, if last read is more than 720 minutes back (by reading time) I don't want to discard current read because of this difference.

I noticed the following is returning a read from 900 minutes back, which is unexpected as far as I can understand:

LAG(Reading,2) 
OVER (PARTITION BY RegisterNumber LIMIT DURATION(minute, 720)) 
[BeforeLastReading]

I can ignore this read in my select query but I prefer to understand the reason before give up using the duration feature...

Dani Toker
  • 406
  • 6
  • 19

1 Answers1

0

Have you tried using the TIMESTAMP BY clause? You can find more documentation on this here: https://learn.microsoft.com/en-us/stream-analytics-query/timestamp-by-azure-stream-analytics

Hyder S M
  • 115
  • 5
  • Yes, Actually I am using timestamp by (for ReadingTime), I'm getting results older than 720 minutes by that field. – Dani Toker Nov 07 '18 at 05:26