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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
msprog
Contributor

Notebook connecting to SQL Server

HEy

we have a onprem sql server. There is a gateway connection to the sql server. 

Now i want to access this sql server via a pyspark notebook. How can i set up a connection to this please. 

 

thanks

 

1 ACCEPTED SOLUTION

do you have a link to the announcement please?

View solution in original post

10 REPLIES 10
lbendlin
Esteemed Contributor III

Is that a Fabric notebook? What will you do next after connecting? Run a SQL query and load it into a dataframe?

yeah Fabric notebook. I read atable and load into a dataframe. 

spencer_sa
Contributor III

One of the announced features at Fabcon Europe was connections coming to notebooks.

do you have a link to the announcement please?

Justyna has just confirmed that notebook connections don't support On Premise yet.

JibinSebastian
New Contributor III

I am also facing the same issue, Could someone help me to get the solution

 

Hi @JibinSebastian,

Right now, Fabric notebooks donโ€™t support connecting to on-prem SQL Server through the gateway. Thatโ€™s why you are not able to connect directly from PySpark notebook.

Regards,
Community Support Team.

 

@v-hjannapu 
Thank you so much for responding. It helps a lot. Will keep in touch

apturlov
Contributor II

@msprog @JibinSebastian You might be able to create a Mirrored SQL database from the on-premise SQL server using an OPDG (on-premise data gateway). It's realtively easy to try but when you are configuring the mirrored database you'd need to use a SQL server account with the admin permission so it can configure CDC. Once the mirroring is working you can create a shortcut to tables in a Lakehouse and now you have full access to the mirrored data from a Notebook.

Thank you @apturlov for your response and efforts, I will  try connecting with  Mirrored SQL database into the fabric.

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (4,724)