Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join now60 Days of Data Days! Live and on-demand sessions, challenges, study groups and more! And it's all FREE!. Join now. Learn more
when using the data warehouse feature of Fabric in PySpark I can connect to the data warehouse and run a query as so...
Solved! Go to Solution.
Data querying within the SQL database (preview) from a notebook is feasible only when the default language of the notebook is set to T-SQL. Upon switching the language to PySpark or Python, querying capabilities are limited to the Lakehouse, and not the databases.
So currently, to execute any PySpark notebooks on the SQL database data, it is necessary to first ingest the data from the database into the Lakehouse using pipelines. Subsequently, PySpark notebooks can be run on the ingested data
Data querying within the SQL database (preview) from a notebook is feasible only when the default language of the notebook is set to T-SQL. Upon switching the language to PySpark or Python, querying capabilities are limited to the Lakehouse, and not the databases.
So currently, to execute any PySpark notebooks on the SQL database data, it is necessary to first ingest the data from the database into the Lakehouse using pipelines. Subsequently, PySpark notebooks can be run on the ingested data
That does appear to be the case although the documentaion and videos do not address this at all. Hopefully Microsoft will relize the importance of this.
If I am not wrong When you use SQL Database (preview) in Microsoft Fabric, the platform automatically replicates your data into OneLake and converts it to Parquet/Delta tables in an analytics-ready format.
Try this
df = spark.sql("""
SELECT *
FROM [YourSQLDatabaseName].[dbo].[YourTable]
""")
Or
df = spark.read.table("[YourSQLDatabaseName].[dbo].[YourTable]")
display(df)
I believe you are referring to the scenario where I have an Azure SQL database and select from that Azure database to Replicate in Fabric.
I am referring to is within fabric you can now create a SQL database, which I did. Those tables are not reflected as delta tabless so I am trying to figure out how to read this data in PySpark.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 22 | |
| 19 | |
| 14 | |
| 14 | |
| 12 |