Export data from Azure SQL database and send it to azure IoT Central

nikita 20 Reputation points
2023-10-17T08:08:39.23+00:00

Can I export data from Azure SQL database and send it to azure IoT Central ?

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
357 questions
{count} votes

Accepted answer
  1. Sander van de Velde 30,321 Reputation points MVP
    2023-10-17T10:15:45.3766667+00:00

    Hello @nikita ,

    yes, it's possible to send data from both devices and services to Azure IoT Central.

    Ingesting data from a database is a common solution for simulation or for systems where sensor data is collected and stored in a local database and the sensor state can be retrieved from that database.

    To ingest device/database data into IoT Central, create an application acting as a device, honoring the device registration.

    Follow this tutorial in any of the programming languages (see also the other tabs).


    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.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,871 Reputation points
    2023-10-20T00:12:18.31+00:00

    Thank you @Sander van de Velde for your inputs on this.

    @nikita , in addition to the above approach mentioned by Sander, you can also leverage Azure functions and add a trigger function such as Timer Trigger to read the data from the database and periodically push it to the Azure IoT Central. Here is an article Add a timer triggered function which provides an example on updating records into the Database. You can modify this function to fetch the records and use 'DeviceClient' class within the function to send telemetry to IoT Central.

    Please refer the sample code provided in How to generate in a single and simple C# project custom telemetry for a IoT Device Template with complex object for reference on how to push the data to your custom device template through the code.

    Hope this helps. Please let us know if you have any additional questions.


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    0 comments No comments