Python + Azure Edge Runtime + IoT edge + Azure SQL DB + Azure function

Jay Mehta 1 Reputation point
2022-12-01T06:41:03.48+00:00

Hello,

I need to develop a Computer Vision-based model inference PoC using python on the Jetson Device.

Problem Scenario:

Now my concern here is, I'm planning to utilize Azure Edge Runtime for communication between the edge device and the cloud, but I need clarity that if I make a change to the Azure SQL DB is possible to trigger an event that can notify the edge device about this change? For this, I'm thinking of 2 scenarios:

  • Is it possible to fire API through Azure Functions based on SQL DB event, that will send/push data to Another API? if yes, will it be possible with python?
  • Is it possible to fire API through Azure Functions based on SQL DB event, that will update the file in the edge device, we will monitor this file periodically and use the updated details in python code.

Can someone please confirm that this is possible and help me with some references?

I'm open to a better solution please feel free to recommend/suggest the same.

Thanks.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
580 questions
Azure SQL Database
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,179 questions
{count} votes

1 answer

Sort by: Most helpful
  1. chbeier 1,871 Reputation points
    2022-12-01T08:56:19.823+00:00

    Hello @Jay Mehta ,

    Just for clarification, I understood you want to use Azure SQL DB in the cloud and not Azure SQL Edge.

    Azure Function has Azure SQL bindings in preview what comes with some limitations. For example, currently the SQL triggers are only supported for C# class library functions, not Python. While this is highly likely to change in the future, there is no guarantee. This feature is still in preview so be aware of the risk!

    If you are fine to use the preview feature and C#, you might use the Azure SQL trigger and in your Azure Function what will do some processing logic to call another API or send a command via IoT Hub's REST API to your IoT Edge device.

    You wrote "update a file..., we will monitor". Depending on the information you want to provide to the python code on the device, either you could instruct the Edge device to download this large file somewhere (e.g., Azure Storage) by passing a link to the device or you directly send the information via one of the cloud-to-device communication options

    There is also an example architecture for a computer vision solution based on IoT Edge shown in the Azure Architecture Center with a full guide how to plan and design a cg workload.

    ----------

    If your question was solved do "accept answer" and feel free to upvote. If you need additional information, please provide more details.

    1 person found this answer helpful.
    0 comments No comments

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.