使用不带流分析的Azure功能将数据从Azure IoTHub存储到SQL数据库中 [英] Store data into SQL database from Azure IoTHub using Azure Functions without Stream Analytics
问题描述
我只有一个设备连接到Iothub,遥测数据小于1k.在这种情况下,Azure Stream Analytics太昂贵了.
I have only one device connecting to Iothub and telemetry data is under 1k. In such situation, Azure Stream Analytics is too expensive.
与Cosmos DB不同,Azure Functions具有其绑定,但具有SQL DB.
Unlike Cosmos DB , Azure Functions has bindings of it , but SQL DB.
如何使用azure函数将数据从Azure Iothub存储到Azure SQL数据库中?
How can I store data from Azure Iothub into Azure SQL Database using azure function?
ps.我正在使用Javascript.
ps. I'm using Javascript.
推荐答案
绝对正确,在这种情况下,Stream Analytics会显得过大.我对您的问题的理解是使用函数"来侦听设备消息并将其存储在SQL数据库中.您需要采取的步骤如下:
Absolutely right, Stream Analytics would be overkill in this situation. My understanding of your questions is to use a Function to listen to device messages and store them in a SQL database. The steps you need to take are as follows: