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

Special holiday offer! You and a friend can attend FabCon with a BOGO code. Supplies are limited. Register now.

Reply
sharp1FL
Helper I
Helper I

UnsupportedArtifactException SQLDatabase in Python notebook tsql cell

I am trying to connect to our Fabric SQL orchestration database using the tsql command as documented here:

https://blog.fabric.microsoft.com/en-us/blog/connect-to-your-sql-database-in-fabric-using-python-not...

 

%%tsql -artifact <ORCH_DB_NAME> -type SQLDatabase -bind df2
SELECT * FROM dbo.<orch_tablename>
 
I get the following error:
UnsupportedArtifactException: Artifact type SQLDatabase is not supported to connect

 

This seems so simple. What am I doing incorrectly?

1 ACCEPTED SOLUTION
v-hashadapu
Community Support
Community Support

Hi @sharp1FL , Thank you for reaching out to the Microsoft Community Forum.

 

Microsoft Fabric notebooks do not support connecting to SQLDatabase artifacts using the %tsql magic command. %tsql in Fabric notebooks currently only supports querying data from Lakehouse and Warehouse artifacts. Attempting to use any other artifact type will result in this exact exception.

 

Ensure your orchestration data is available in a supported artifact like a Warehouse or Lakehouse, then modify your code as follows:

%%tsql -artifact MyWarehouse -bind df2

SELECT * FROM dbo.my_table

 

Author and run T-SQL notebooks in Microsoft Fabric - Microsoft Fabric | Microsoft Learn

Run T-SQL code in Fabric Python notebooks - Microsoft Fabric | Microsoft Learn

View solution in original post

10 REPLIES 10
sukkaur
Microsoft Employee
Microsoft Employee

@sharp1FL  - Please try TSQL magic command again. There was an error and it's fixed. Thanks

sharp1FL
Helper I
Helper I

Thanks for the clarification, though I am disappointed. 

 

I'm using SQL because it makes more sense than delta for orchestration. Would there be additional overhead or performance implications for using the data warehouse artifact for CRUD operations on the orchestration tables? 

I dug a little more, and it appears that the documentation beat the availability of this feature for SQL databases. 

 

From @sukkaur "Team is working on this capability and this should be coming available for customers use by next month."

 

How to connect to Fabric database from fabric note... - Microsoft Fabric Community

 

Hi @sharp1FL , Thank you for reaching out to the Microsoft Community Forum.

 

Yes, using a Warehouse for orchestration tables works, but it’s not a perfect substitute for a SQL database. Fabric Warehouses are optimized for analytical queries, not transactional operations. Frequent INSERT/UPDATE/DELETEs can be slower and less efficient than in a SQL database and transactional guarantees (like row-level locking) are limited.

 

For light or batched orchestration logic (e.g., logging or status updates), it’s a workable short-term solution. But for high-frequency or dependency-sensitive writes, you may hit performance limits. Once SQL database support in notebooks is live, it’ll be the better fit.

 

Limitations of Fabric Data Warehouse - Microsoft Fabric | Microsoft Learn

v-hashadapu
Community Support
Community Support

Hi @sharp1FL , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.

BhaveshPatel
Community Champion
Community Champion

Hi @sharp1FL 

 

You should understand that difference between data lake, delta lake and linux operating system. Before going ahead,

 

Here you have to use T-SQL in Fabric Warehouse. 

 

BhaveshPatel_0-1754213930351.png

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
v-hashadapu
Community Support
Community Support

Hi @sharp1FL , Thank you for reaching out to the Microsoft Community Forum.

 

Microsoft Fabric notebooks do not support connecting to SQLDatabase artifacts using the %tsql magic command. %tsql in Fabric notebooks currently only supports querying data from Lakehouse and Warehouse artifacts. Attempting to use any other artifact type will result in this exact exception.

 

Ensure your orchestration data is available in a supported artifact like a Warehouse or Lakehouse, then modify your code as follows:

%%tsql -artifact MyWarehouse -bind df2

SELECT * FROM dbo.my_table

 

Author and run T-SQL notebooks in Microsoft Fabric - Microsoft Fabric | Microsoft Learn

Run T-SQL code in Fabric Python notebooks - Microsoft Fabric | Microsoft Learn

According to this page it is supported:

https://blog.fabric.microsoft.com/en-us/blog/connect-to-your-sql-database-in-fabric-using-python-not...

 

I get the same error as @sharp1FL however.

 

Anyone here able to use the feature as described in that blog page?

@ernie8925 - Please try this capability again. This should work now. There was an error that team just finished fixing. Thanks 

It works now! Thanks!

Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

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.

Top Solution Authors
Top Kudoed Authors