0
votes

We are playing with ASA and we just reach a certain point that we cannot go forward.

Our Scenario: EventHub -> Stream Analytics -> SQL Server

What we like to do: After receive some event, stream analytics should get the information, lookup on our sql server azure db some row, sum() and update back the sql server.

As far we know, ASA just uses SELECTs not UPDATEs.

Does anyone know how to do it?

1
Is it an Azure SQL Database? The following from MSDN indicates: "Azure SQL Database can be used as an output for data that is relational in nature or for applications that depend on content being hosted in a relational database. Stream Analytics jobs will write to an existing table in an Azure SQL Database." - David Tansey

1 Answers

2
votes

You can look into using triggers to achieve this and have your ASA job write the event you're looking for to SQL database and the trigger will decide what to do (update, insert etc.) The SELECT statement inside and ASA query is to read data from inputs, the INTO clause defines where the result of the query will be stored.

Hope it helps, Thanks