I'm trying to do a TumblingWindowing in Azure Stream Analytics with the following query:
SELECT
System.Timestamp() as SysDate,
Types,
Brands,
SUM(Price) as SumPrice
INTO
Output
FROM
Source
TIMESTAMP BY
CAST(Date as DATETIME) #This is the source data Date field 'Date'
GROUP BY
TumblingWindow(minute,5),
Types,
Brands
In the UI of the ASA I can see that I'm having the desired output:
SysDate | Types | Brands | SumPrice |
---|---|---|---|
2021-01-26T08:10:00.0000000Z | T1 | B1 | 29,00 |
2021-01-26T08:10:00.0000000Z | T2 | B2 | 67,00 |
2021-01-26T09:05:00.0000000Z | T3 | B2 | 89,00 |
For some reason, when I enter this data in PBI it is taking the date of creation of the event in Eventhub and not the date that comes inside the event. You can see that the windowing does it well, but once it is shown in PBI it does not take into account the date of the data but the date of the event creation.
In the UI of ASA I can see dates from january and in PBI is getting from today (Frebuary)
What is happening here?
This was solved using the UI of the ASA and specifying in "event ordering" the event order and late event interval. ASA was automatically adjusting the dates that were 5 seconds late. And in that setting, instead of setting the actual date, it overwrote the current date.