Using external languages with Power BI
In this section, we will try to solve the problem of publishing to the Power BI service the report that shows the value predicted by the Titanic Survival machine learning model based on the parameters selected in the report itself, which you saw in Chapter 17, Using Machine Learning without Premium or Embedded Capacity.
In this particular case, any change to the parameters in the report will update the value predicted by the model without having to update the Power BI dataset. If we think about how this translates to the use of external languages, it means that each time the parameters are changed, a query to SQL Server must be launched that runs the model scoring script, passing the various parameters selected in the report. In other words, we need the DirectQuery mode to have real-time data. Power BI doesn’t store any data. Instead, every time you create a visualization or run a query, Power BI sends a request directly to the data...