-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Power Query Cookbook
By :

Data is not only located in databases, but also in files, online services, and third-party applications as a growing number of users require the ability to connect to information available on the web. The idea behind the web connector is to allow easy and intuitive information extraction from websites. In this section, we will explore the possibilities of this connector and we will connect to a web page to extract data in an easily readable format.
For this recipe, you need Power BI Desktop and access to the following website: https://www.packtpub.com/eu/all-products.
In this recipe, the idea is to retrieve data from the Packt online catalog. By clicking on the preceding link, you will see the following site:
Figure 2.42 – Packt online book catalog
Imagine you want to extract data regarding the books available on this site.
Open Power BI Desktop and follow these steps:
Figure 2.43 – Web connector
Figure 2.44 – Web connector authentication
Figure 2.45 – Web tables preview
Figure 2.46 – Web data preview in Power Query
We will try another feature to extract data from the website and test an advanced link by inserting filters at the URL level:
Figure 2.47 – Web connector advanced
Figure 2.48 – Add Table Using Examples button
a) Title
b) Author
c) Nr. Pages
d) Publication Date
The columns should look like the ones in the following screenshot:
Figure 2.49 – Add Table Using Examples
Figure 2.50 – Add Table Using Examples details
Figure 2.51 – Insert custom table from examples
With these simple steps, it is possible to connect and extract information from a website with a no-code approach. Users can focus on the content of data and not on the process of how to connect since Power Query allows them to do it in a few steps.
This web connector not only allows users to connect to data from web pages by leveraging pre-defined tables identified by Power Query, but it also gives the ability to provide data examples from a web page and generate a custom table with relevant information for the user.