Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
apturlov
Advocate I
Advocate I

Querying a Fabric SQL Database from a Notebook

Fabric SQL Database is a relatively new storage option in Microsoft Fabric, ideal for transactional workloads. However, for data science, machine learning, or exploratory analytics, connecting via SQL endpoints can be limiting. These workloads benefit from the flexibility of Fabric Notebooks, but SQL Databases aren't natively accessible from notebooks.

You can work around the notebook access limitation by creating a Lakehouse shortcut to a Fabric SQL Database. This exposes the SQL tables as Delta-like folders in the Lakehouse’s Files section, making them accessible from notebooks.

So, here is a SQL database in Fabric populated with a samle dataset:

apturlov_0-1755124824002.png

Next, I created a shortcut in a Lakehouse in the same workspace:

apturlov_1-1755125053220.png

A shortcut appears under the Files section in the Lakehouse with a hierarchical folder structure Schema/Table. The file content of a table folder reveals that this is a delta table. Now I can create a Notebook in this Lakehouse and use a simple code to load the SQL table content into a dataframe as a delta format:

apturlov_2-1755125253592.png

I can go one step further and create a temporary view from the dataframe for convenience:

apturlov_3-1755125475302.png


This approach can be useful for exploratory data analysis in notebooks, lightweight transformations before writing to a Lakehouse table, or bridging SQL and Spark workflows without duplicating data.
However, keep in mind, that a SQL database shortcut is read-only, not changes can be made to the underlying Fabric SQL database from a notebook via a shortcut.

4 REPLIES 4
v-venuppu
Community Support
Community Support

Hi @apturlov ,

Please follow the below Process:

Blogging in the community - Microsoft Fabric Community

 

Thank you.

v-venuppu
Community Support
Community Support

Hi @apturlov ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @wardy912 for the prompt response.

Thank you so much for sharing this, This kind of post is incredibly valuable to the community. Definitely consider turning this into a blog post as suggested by @wardy912 , so others can benefit from your experience more easily.

Power BI Community Blog - Microsoft Fabric Community

 

 

@v-venuppu @wardy912 Thank you for the suggestion. I would absolutely consider turning this into a blog post. Could you help enable access to creating a blog post for me? Once I can create a blog post I will proceed. 

wardy912
Impactful Individual
Impactful Individual

Hi @apturlov 

 

 This is great information, but would be better placed in the blogs section.

Helpful resources

Announcements
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

Check out the July 2025 Fabric update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.