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

Fabric Data Days Monthly is back. Join us on March 26th for two expert-led sessions on 1) Getting Started with Fabric IQ and 2) Mapping & Spacial Analytics in Fabric. Register now

Reply
apturlov
Continued Contributor
Continued Contributor

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.

If you find this answer useful or solving your problem please consider giving kudos and/or marking as a solution.
1 ACCEPTED SOLUTION
v-venuppu
Community Support
Community Support

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

 

 

apturlov
Continued Contributor
Continued Contributor

@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. 

If you find this answer useful or solving your problem please consider giving kudos and/or marking as a solution.
wardy912
Super User
Super User

Hi @apturlov 

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.

Top Kudoed Authors