Blog: Update for Microsoft Azure Stream Analytics – IoT

Blog: Update for Microsoft Azure Stream Analytics – IoT

Last week Microsoft finally updated Microsoft Azure Stream Analytics with great new features. In this blogpost I explain some new features I use in our projects now.

Using custom code in your Microsoft Stream Analytics Query

In our projects we have sometimes challenges with the data we are receiving in Stream Analytics for the Microsoft Azure IoT Hub (finally the sensor off course…). For example we sometimes work with the Sigfox IoT network. With this network a device can sent small datapackages to the Azure IoT Hub, most of the times this is sent via a HEX format. Normally you want to transform this HEX data to a integer. (Yes, you can do it afterwards, but I want to do this directly in Stream Analytics query). One of the new functions just launched is support for Custom Code with JavaScript user defined functions. This is great, because I can great a function in Stream Analytics and transform my Hex to an INT just in the query. Here is how you do this:

  1. First of all you go to your Microsoft Stream Analytics job and select ‘Function’ and add a new one:
azuresafunction
Add a function in Azure Stream Analytics

2. After that you will get a window to create your javascript. In this example you see a hex to int function:

azuresaudf
Create UDF Javascript in Stream Analytics – Hex2Int sample

3. Now you can use your Javascript function in your query of Stream Analytics. Just type udf. than your function name and you can transform your HEX to an integer.

azuresausingfunction
Using UDF Javascript in your query of Stream Analytics

 

Visual Studio integration for Azure Stream Analytics

One challenge I have with creating queries in Azure Stream Analytics (yes, I am not the best with SQL..) is testing my queries with the data input. I was costing me a lot of time. I was the last weeks part of a private preview of the integration of Azure Stream Analytics in Visual Studio. That is now in public preview(download here). With this add-in you can export (or import) your Microsoft Stream Analytics projects in Visual Studio and test everything locally! Currently only Visual Studio 2015 is supported.

  1. First or all go to your Server Explorer and navigate to Stream Analytics and hit the export button.
vssaintegration
Export in Visual Studio a Stream Analytics project

2. Then your complete stream analytics project is exported to Visual Studio 2015. Here you get some great functionalities

vssaintegration2
Exported Azure Stream Analytics project in Visual Studio

Functionalities:

  • Syntax Highlighting in your queries
  • You can write your query and test it directly to testdata! Just hit F5!
  • You can write your custom Javascript code
  • You have off course directly integration with TFS / source control
vssaintegration3
Using local data to test your new queries

Low-latency dashboards in Power BI

Another new update is low latency support in your Microsoft Power BI output of Azure Stream Analytics. (Power BI streaming sets). The latency is now much better then some weeks ago. So you get faster insights in your data!

powerbilowlatency
Low latency in Power BI as output in Stream Analytics

Others

Other new functionalities:

  • Native support for Geospatial functions; now you can define geographical areas in your Azure Streaming job.
  • Job Diagnostics logs; there is now an integration with Azure Monitoring to better monitor your Stream Analytics Jobs!

 

 

 

 

 

 

Advertisements

Power BI app update with Q&A on your dataset!

Power BI app update with Q&A on your dataset!

Today I received again a new update of the Power BI app on my iPhone. I was really happy with the release notes:

  • Q&A support / ask your data in Preview

When you open a report in Power BI, you see now at the button a chat button (beside the favorite button):

screen3

When you click on the button, you get a Q&A window:

screen2

Here you can ask the question. The great thing is that Power BI is already providing you sample question about the dataset. Below an example I asked the data, I get a report with a graph!

screen1