How to get data from a Fabric Lakehouse File into Power BI Desktop – Using Scanner API JSON

In this blog post I am going to show you how I connected to my Scanner API JSON file which is stored in the files section of my Microsoft Fabric Lakehouse.

Full credit on how to complete this comes from Marc’s blog post https://data-marc.com/2023/08/25/access-onelake-files-from-power-bi-desktop/

This is where my Scanner API JSON file is stored in my Microsoft Fabric Lakehouse

A screenshot of a computer

Description automatically generated

Getting the WorkspaceId and LakehouseId

The steps below I will show you how to connect to the files in your Lakehouse getting the workspaceId and LakehouseId.

  • The first thing you need to do is to get the Workspace ID and Lakehouse ID.
  • To do this I navigated to my App Workspace where my lakehouse files are and then went into my Lakehouse. As shown below where I am in my Lakehouse.
    • A screenshot of a computer

Description automatically generated

1 – This is where I clicked on my App Workspace

2 – This is where I opened my Lakehouse called “FM_LH”

3 – This is where I can see the details of my Lakehouse.

  • Now in the URL in my Browser I will copy the details as explained below.
    • 1 – This is the WorkspaceId
      • EG: cb2af739-998e-bbbb-aaaa-f78d2e8fc1dd
    • 2 – This is the LakehouseId
      • EG: 260cc545-9a59-aaaa-bbbb-fb705d4bc4ae
    • Keep a note of the WorkspaceId and LakehouseId

Connecting to your Lakehouse Data

In the steps below I will show you how to connect to the lakehouse data using the PBIT.

NOTE: Please make sure that you have followed my previous blog post Downloading Scanner API data using a Microsoft Fabric Notebook where the Scanner API JSON file is in the folder called “Scanner_API”

  • Download the Blog – Get Power BI Scanner API.pbit
  • When the PBIT is opened it will prompt you to put in the WorkspaceId and LakehouseId as shown below.
    • A screenshot of a computer

Description automatically generated
  • Then click on Load
  • After a little while it should prompt you to authenticate.
    • Click on “Sign in as a different user”
    • A screenshot of a computer

Description automatically generated
  • Next, follow the login authentication based on your organization login requirements.
    • A screenshot of a computer

Description automatically generated
  • Once signed in I then clicked on Connect
    • A screenshot of a computer

Description automatically generated
  • Once you click the data should then load and you should see the following once it has completed.
  • As shown below it should get the JSON file and load it.
    • A screenshot of a data sheet

Description automatically generated
  • If you are interested in how, it gets the data, as per Marc’s blog post It is using the Power Query connector “Lakehouse.Contents”
    • And then the WorkspaceId and LakehouseId is being passed as shown below.
    • Which when looking at the Power Query Applied steps, I can then see all the folders and files in my Lakehouse.
    • A screenshot of a computer

Description automatically generated

Summary

Thanks for reading my blog post I hope that you now know how to get data from the Lakehouse files.

Here is what can be achieved from using the Scanner API data when looking for related items in Fabric shown below.

A screenshot of a computer

Description automatically generated

In future blog posts I will show you how to get some valuable information from the Scanner API data.