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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
Shreya_Barhate
Advocate I
Advocate I

How to Call a Notebook mounted with TSQL Analytics from a Notebook running on Spark session?

I’m currently working on a project where I need to call a notebook mounted with TSQL Analytics from a notebook running on Spark session.

I tried using %run magic command to call the TSQL notebook but I'm facing an issue.

Shreya_Barhate_0-1729846783028.jpeg

 

3 REPLIES 3
JayKidd81
New Member

Are there any potential workarounds to run a TSQL Notebook from a PySpark Notebook available? 🙂

 

We currently have a complex workflow spread across several Notebooks from Lakehouse to Warehouse which we're trying to combine into a single Run-All Notebook. Getting stuck figuring out how to run the TSQL Warehouse Notebooks? 🙂

JayKidd81
New Member

Related Idea to up-vote! 🙂

Anonymous
Not applicable

Hi @Shreya_Barhate 

 

It seems the feature is not well supported yet. When I run a SQL query similar to yours which contains brackets "[]", I got the same error message saying "Syntax error at or near '['". 

vjingzhanmsft_0-1730102565774.png

 

When I remove all brackets from that query, I got the error "Cannot resolve function 'TOP'..."

vjingzhanmsft_1-1730103360451.png

 

However when I run a simple query "SELECT * FROM data2;" it succeeds.

vjingzhanmsft_2-1730104056899.png

 

But when the query is "SELECT * FROM mydw.dbo.data2;" it failed with an error that "spark_catalog requires a single-part namespace...

 

I guess that as the T-SQL notebook feature is still in preview, it is not very well supported yet and needs to be impoved to work with Spark notebooks better. Please raise your ideas at Fabric Ideas Forum to let the product team get aware of what features you require. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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