Chapter 9: Calling External APIs to Enrich Your Data
In the previous chapter, you saw an example of how to enrich the data you already have with external information. In that instance, the data was provided via CSV files, but this is not always the case. Very often, the data useful for enrichment is exposed via external Application Programming Interfaces (APIs), most frequently in the form of web service endpoints. Power BI allows you to read data from a web service via a dedicated UI, but most of the time it is unusable. Therefore, you have to resort to writing M code to get it done. Writing M code isn't too difficult, but it's not that straightforward either. You also have to be careful not to write code that leads to refresh issues when publishing the report to the Power BI service. Moreover, in Power BI, it is not possible to parallelize more than one call to the same web service in order to reduce waiting time when retrieving data. Adopting Python or R to get data from...