0

unsure if the right place for my question. In the Azure portal there are many tools for Analytics and Monitoring; however they all seem to be for server related metrics such as CPU usage, query times, etc.

I'm looking to write my own queries that query tables in my database and can send an email when such conditions are met. For example, say I had a table of credit card transactions, I'd want to write a select statement that calculates the 4-day moving average and sends a notification when over $1000.

I'm not seeing what tool/service in Azure portal can do this. I'd prefer to do it under the Azure toolkit and not a third party tool if possible (but open to suggestions). Thanks for the help!

gompertz
  • 113
  • 1
  • 4

1 Answers1

0

You can use the "when an item is created" and the "when an item is modified" triggers for SQL in Azure Logic App to react to data changes.

The SQL connector in Azure Logic Apps uses a polling mechanism to query a table for changes using a TIMESTAMP / ROWVERSION column. This data type is specifically designed for this kind of processing in SQL. The polling query essentially selects all rows where the rowversion is greater than the last polled value. The behavior is reliable since the column is controlled by SQL Server and the performance is extremely fast in the case where there is no new data. When there is new data, the performance is comparable to a simple row query.

For more information, please read this article.

You can send an email from a Logic App as explained here.

Alberto Morillo
  • 256
  • 1
  • 4