1

I have created a stream analytic's job in Azure and i want to display the results in Power BI. The job is pretty simple since all i want to do is display every 1 sec the number of events which occured in the last 10 minutes. However, when the last 10 minutes pass, i need the counter to reset which means that i want the window to restart after 10 mins.

I have the following options:

  • Use a tumbling window with duration 10 mins: No, since this wont display the result every 1 sec but after 10 mins
  • Use a Hopping window: HoppingWindow(Duration(minute, 10), Hop(second, 1)). This works for the first 10 mins but after that no because it hops-slides 1 sec.
  • Use a Sliding Window with a 10 mins size: No, because it slides for 10 mins when an event occurs
  • Use a SessionWindow: No, since the session window returns an output only when the window closes.

I cant figure a solution since my goal is a window that expands till it reaches the maximum 10 mins duration(then it reopens) and produces the output every one second. Any help is welcome.

Kon Kyri
  • 139
  • 2
  • 11

1 Answers1

0

Firstly, i think it's a common requirement here. As the detailed limitation of every window you summarized by yourself in your question, ASA doesn't have a type of window to meet your requirement:

refresh metric every single 1 sec and reset the metric every 10 minutes.

Apparently, the Hopping window is the relatively in line with your needs. However, it won't reset the number every 10 minutes. As we know, In Azure Stream Analytics, all Window functions are defined in a job with a fixed length and the job need to be executed continuously. No such reset feature could be supported.

Only idea i could came up with is still using Hopping window and restarting the job every 10 minutes manually. Please see this article. It could force the job calculate first 10 minutes every single time. I know it may be a little imprecise, but you can try if you don't have any other choices to see if you can accept it.

Jay Gong
  • 23,163
  • 2
  • 27
  • 32