Search code examples
azureiotazure-stream-analyticsazure-machine-learning-service

Pulling data from Stream Analytics to Azure Machine Learning


Working on a IoT telemetry project that receives humidity and weather pollution data from different sites on the field. I will then apply Machine Learning on the collected data. I'm using Event Hubs and Stream Analytics. Is there a way of pulling the data to Azure Machine Learning without the hassle of writing an application to get it from Stream Analytics and push to AML web service?


Solution

  • Stream Analytics has a functionality called the “Functions”. You can call any web service you’ve published using AML from within Stream Analytics and apply it within your Stream Analytics query. Check this link for a tutorial. Example workflow in your case would be like the following;

    • Telemetry arrives and reaches Stream Analytics
    • Streaming Analytics (SA) calls the Machine Learning function to apply it on the data
    • SA redirects it to the output accordingly, here you can use the PowerBI to create a predictions dashboards.

    Another way would be using R, and here’s a good tutorial showing that https://blogs.technet.microsoft.com/machinelearning/2015/12/10/azure-ml-now-available-as-a-function-in-azure-stream-analytics/ . It is more work of course but can give you more control as you control the code.