Azure Stream Analytics - Error with customized “timestamp by” while applying window tumbling

前端 未结 1 829
情深已故
情深已故 2021-01-16 06:21

I have a json file as below:

{\"imei\": {\"imei\": \"358174069248418F\", \"imeiBinary\": \"NYF0BpJIQY8=\",\"imeiNotEncoded\": \"358174069248418\",\"va

1条回答
  •  别那么骄傲
    2021-01-16 06:29

    According to https://msdn.microsoft.com/en-us/library/mt598501.aspx TIMESTAMP BY can only be used on input sources, so you would want to put that as part of your very first step:

    WITH Datapackets AS
    ...
    FROM h24 TIMESTAMP BY (expression)
    ...
    

    Furthermore, from the same source, referring to System.TimeStamp when used with a GROUP BY over a window:

    The timestamp of the result of the aggregate is the end of the time window to which this result corresponds.

    So when you write System.TimeStamp in the final SELECT statement, it refers to the end of the current window.

    0 讨论(0)
提交回复
热议问题