Using the new Power Query Experience in Fabric Notebooks as a Skill
I have created a new Skill which can be imported in your favourite LLM for when you want to use a Microsoft Fabric Notebook to run Power Query Code.
Here is the Microsoft Learn Page: https://learn.microsoft.com/en-us/fabric/data-engineering/notebookutils/notebookutils-power-query
Why use Power Query?
The question that came to my mind, was why use Power Query in a Notebook?
There are times when trying to access a certain data source in a notebook can be challenging. While this can quite often be easily done with Power Query.
- Power Query can access over 100 different data sources.
- Power Query supports over 350 types of data transformations.
- It is possible to route data for a Notebook via a connection (which can use Azure Key Vault) which is then linked to a Gateway or VNET Data Gateway.
- This makes the path easier to configure and share with others.
- Visual editor generates M which you can still edit M when needed.
NOTE: You will still consume Capacity Units when the M Code is running in your capacity
Downloading and setting up the Skill for Visual Studio Code
In this example below I will show you how I downloaded and installed the Skill for Visual Studio Code.
I have the skill saved here: https://github.com/GilbertQue/Fabric/blob/main/power-query-fabric-notebooks/SKILL.md
Next download the file SKILL.md

For Visual Studio Code I then did the following to allow it to be visible in VS Code
- I went to my User Profile
- %USERPROFILE%\.copilot\skills
- I then created a folder called power-query-fabric-notebooks
- I then copied the downloaded SKILL.MD into this folder

I then opened VS Code
I then searched for the Skill which I could now see

How to get the Power Query for a Notebook
The good news is that you do not need to know how to write Power Query code by hand. These days you can use your favorite LLM to write the code for you!
And this is where the Skill I have at the end of my blog post can assist you!
Open Visual Studio Code and make sure you also have got the Power Query Extensions installed

Then you can start a new chat asking it to create a Fabric Notebook using Power Query to connect to a weather API

This resulted in the Notebook being created as shown with the snippet below.



Summary
I hope you found this useful and will use this skill for your Fabric Notebooks
Thanks for reading!