Stream Analytics on Edge with OPC UA Publisher

Anurag Shelar 181 Reputation points
2021-04-28T18:50:18.247+00:00

Hi @Sander van de Velde , followed your blog post for Getting Started with OPC UA Publisher . It made my life a lot more simpler. So Thank you for that.

Now that I have my OPC Publisher module running on Edge, I would like to filter some data before sending it to IOT hub. So for that I would like to run Stream Analytics on Edge module.
I needed some help in this context. Such as what should my routes be, how should I write the query.

The json my OPC Publisher module is sending to IOT Hub currently if of the form.
{"NodeId":"http://www.prosysopc.com/OPCUA/SimulationNodes/#i=1004","ApplicationUri":"urn:host.docker.internal:OPCUA:SimulationServer","DisplayName":"Temperature","Value":{"Value":1.902113,"SourceTimestamp":"2021-04-28T10:47:06Z"},"EventProcessedUtcTime":"2021-04-28T10:48:27.0652993Z","PartitionId":1,"EventEnqueuedUtcTime":"2021-04-28T10:47:15.5030000Z","IoTHub":{"MessageId":null,"CorrelationId":null,"ConnectionDeviceId":"opauavm","ConnectionDeviceGenerationId":"637551916393812820","EnqueuedTime":"2021-04-28T10:47:15.5110000Z"}}

PS: By filtering data, I mean I would like to have some conditions like if pressure>30 or temperature<70, only then I should be able to send data to IOT hub.

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.
534 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,115 questions
Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
330 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 28,311 Reputation points MVP
    2021-04-28T19:31:52.627+00:00

    Hello @Anurag Shelar ,

    thanks for letting me know my blog is helping you a lot.

    You want to run an Azure Stream Analytics Job on the edge. This is a great way to handle data locally indeed.

    I recommend starting to gain experience with Azure Stream Analytics with the MS Learn learning path.

    From there, play with the use case you have in mind using Visual Studio Code or Visual Studio (building a query in the Portal browser is great for demonstration but you lack version control and building up a history of queries you can roll back).

    You do not have all cloud capabilities on the edge (it's just an IoT device after all) so check out the edge limitations before you are going to design the edge queries.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful