Power BI and Azure ML – Better Together

Reposted from the Power BI blog

We’ve seen lots of interest in the community to visualize the output of an Azure ML model using Power BI. What’s more, if one could operationalize Azure ML models through the Power BI service, that would be even more awesome. You could then have Power BI surface the latest output of your fraud model or Twitter sentiment about your product.

We now have a tutorial that shows you how to do just that.

The tutorial assumes your data is in an Azure SQL database but you can tailor the example to a data source of your choice, like a local CSV or an on-premises SQL installation. The secret sauce for the tutorial is the power of R integration in Power BI, which acts as a glue between the two services. In addition to a Power BI and Azure ML subscription, you will need to download R and an (optional but recommended) R GUI such as RStudio.

Our example uses the well-known Titanic dataset and the purpose will be to use data such as gender, passenger class and departure port to predict how likely someone would have been to survive the Titanic disaster.

By the end of the tutorial we will have set up the following workflow:

The high level steps are:

  1. Use R to extract data out of Azure SQL that has not yet been scored by our ML model.
  2. Use R to call the Azure ML web service and send it the unscored data.
  3. Write the output of the Azure ML model back into SQL.
  4. Use R to read scored data into Power BI.
  5. Publish the Power BI file to the Power BI service.
  6. Schedule a refresh of the data using the Personal Gateway (which triggers a scheduled re-run of our R script and brings in new predictions).

Learn all about the tutorial here. Share your comments or feedback below.

ML Blog Team