Assaf Sheep
Assaf Sheep

Reputation: 583

Azure Stream Analytics - long living calculation

I'm using Azure stream analytics for real-time analytics and I have a basic problem. I have a field which I would like to count the number of messages. The json is in the following format:

{ categoryId: 100, name: 'hello' }

I would like to see the number of count by category, so I assume that the query in Azure stream analytics should be:

    SELECT
    categoryId,
    count(*) as categoryCount
INTO
    categoriesCount
FROM
    categoriesInput
GROUP BY
    categoryId

The problem is that I have to add TumblingWindow or SlidingWindows to the group by clause. Is there a way to avoid that and have the calculation running indefinitely ? Also I need to make sure the output is written to the SQL server.

Upvotes: 0

Views: 163

Answers (1)

neolursa
neolursa

Reputation: 432

How about a sliding window with the length of "1". This way it would act like a pointer and everytime it changes you can do the calculation?

Hope this helps!

Mert

Upvotes: 0

Related Questions