Forum Discussion
sharp1FL
Helper I
1 year agoUnsupportedArtifactException 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-p...
- 1 year ago
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