Are there any examples of replacing Azure Stream Analytics by Azure Functions for distributing data coming from IoT hub into SQL db?

94 Views Asked by At

Are there any examples of replacing Azure Stream Analytics by Azure Functions for distributing data coming from IoT hub into Azure SQL database?

According to the question raised here and answers to it I can replace Azure Stream Analytics by Azure Function. My current architecture is as follows: IoT edge devices > IoT hub > Stream Analytics > SQL database. Due to the cost of Stream Analytics I would like to replace Stream Analytics.

My Stream Analytics job gets a JSON messages from IoT hub and distributes them into tables of Azure SQL database. To distribute the data the query in the SA job is utilized.

I would thanksfull to get at least hints to the resources on how I should replace SA (it is better to do it in python, but C# is ok as well).

1

There are 1 best solutions below

0
Sampath On
  1. Create an Azure IoT Hub resource.
  2. Create an Azure Function with an Event Hub binding to the default endpoint of IoT Hub.
  3. Add the SQL connection string to the application settings of the Function.
  4. Write c# code for SQL database.

The Another method is to stream using Azure Stream Analytics integration with Azure SQL Database.

enter image description here

  • For more details, refer to this MSDOC.