Parsing JSON or XML
We may sometimes find mixed data structures within the same query. In this recipe, we will see how to deal with mixed data structures when single columns within a table contain JSON data structure. The same reasoning would apply to XML structure too.
Getting ready
For this recipe, you need to have Power BI Desktop running on your machine. You need to download the following file in a local folder:
InternetSales
CSV file
In this example, we will refer to the C:\Data
folder.
How to do it
Once you open your Power BI Desktop application, you are ready to perform the following steps:
- Click on Get Data and select the Text/CSV connector.
- Browse to your local folder where you downloaded the
InternetSales
CSV file and open it. The following window with a preview of the data will pop up. Click on Transform Data: - Browse to the Home tab and click on Use First Row as Headers...