How to store data from sensors to Azure?

Joanna Nowicka 0 Reputation points
2023-07-10T08:59:24.9133333+00:00

Hi all,

I send the data from sensors to Azure via MQTT - the data are there as I can see them on the monitor. What I would like to do now is to store the values from sensors in some kind of the database in Azure and then - make a chart out of them. Where do I begin? What resources do I need? Can I do it for free or those kind of tools are to be paid for?

I'm new to Azure and quite confused. All help would be appreciated!

Azure SQL Database
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,236 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 35,926 Reputation points
    2023-07-10T16:27:52.13+00:00

    Joanna Nowicka Greetings & Welcome to Microsoft Q&A forum

    I would like to do now is to store the values from sensors in some kind of the database in Azure and then - make a chart out of them.

    Your scenario looks good. Please note that this process involves multiple services available in Azure and each of these pricing varies depends on the usage.

    You can follow below approach that exactly matches your scenario. User's image

    • Create a consumer group on your IoT hub.
    • If you would like to store the data, you can configure routing to DB.
    • Create and configure an Azure Stream Analytics job to read required data from your DB and send it to Power BI.
    • Create a report of the data in Power BI and share it to the web.

    I Would suggest you start with the below documentation and let us know if you need any further help.

    Visualize real-time sensor data from Azure IoT Hub using Power BI

    Understand data store models

    Storing IOT Data in Azure: SQL vs Cosmos vs Other Methods

    Hope this helps. Do let us know if you have any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

  2. Sander van de Velde | MVP 34,766 Reputation points MVP
    2023-07-10T20:50:31.7333333+00:00

    Hello @Joanna Nowicka,

    it's a common scenario to store data into a Cloud database so you create dashboards on top of that data.

    Then, you are in control of the format of the data and how long the data is made available.

    Here is a quite elaborate example that is popular for many customer use cases.

    But this powerful solution comes with a price.

    If you want a more simple solution, which comes only with the cost of a single extra EventHub (which is cheaper than a Stream Analytics Job due to the functionality offered), check out the free Azure Data Explorer.

    User's image

    You can create nice Azure Data Explorer dashboards on top of the database, or Grafana, or PowerBI.

    I recommend this database and integration because the knowledge gained will always come in handy and it's a great starting point for other IoT use cases.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.