Short answer: every Fabric lakehouse (and mirrored database) comes with a SQL analytics endpoint: a read-only T-SQL view of its Delta tables. You can query the tables, and create views, functions, procedures and permissions on them, but you cannot insert, update or delete rows there. Tools that speak SQL, from SSMS to Excel, connect to it like a database.
It lets a SQL user read a lakehouse that Spark writes, without a copy. The one surprise is that it is read-only, and that it follows the lake with a short delay.
What can you do there?
| Statement | Allowed |
|---|---|
| SELECT from the lakehouse's tables | yes |
| CREATE VIEW, FUNCTION, PROCEDURE | yes |
| GRANT, DENY, row-level and column-level security | yes |
| Queries across items in the workspace | yes, with three-part names |
| INSERT, UPDATE, DELETE, MERGE on tables | no, write with Spark |
| CREATE TABLE | no, tables come from the lakehouse |
A view for the report team, joining two tables the notebook wrote:
CREATE VIEW reporting.monthly_sales AS
SELECT d.[Year], d.[Month], c.Region, SUM(f.Amount) AS Revenue
FROM dbo.fact_sales AS f
JOIN dbo.dim_date AS d ON d.DateKey = f.DateKey
JOIN dbo.dim_customer AS c ON c.CustomerKey = f.CustomerKey
GROUP BY d.[Year], d.[Month], c.Region;Why is a new table not there yet?
- 1Spark writesa Delta table in the lakehouse's Tables
- 2Syncthe endpoint reads the Delta log and updates its metadata
- 3T-SQLthe table and its new rows can be queried
The endpoint keeps its own metadata in step with the lake, and that sync runs in the background. Right after a notebook creates a table, a query can miss it for a short while. The endpoint's Refresh button, or the metadata sync API, runs the sync at once; a pipeline that queries straight after loading should call it first.
What goes wrong?
- Only Delta tables appear. Files in the Files area, or tables in another format, are not visible to SQL.
- Column names with spaces or odd types. Spark allows names and types that T-SQL handles badly. Name columns plainly in the notebook.
- Security set in two places. Permissions on the endpoint do not stop someone with workspace access from reading the files through Spark. Control who has workspace roles first.
Where can you check this?
- Microsoft Learn: What is the SQL analytics endpoint for a lakehouse?
- Microsoft Learn: SQL analytics endpoint performance considerations
Where do you start?
Fabric lakehouse or warehouse says when read-only SQL is enough and when you need a warehouse. The open course A lakehouse in three layers ends with tables you can query here.