---
title: "Discussion on \"Querying SQL Endpoint of Fabric Lakehouse/Warehouse In A Notebook With T-SQL\" | Hashnode"
description: "Discussion on \"Querying SQL Endpoint of Fabric Lakehouse/Warehouse In A Notebook With T-SQL\". Cross workspace querying using the spark connector to detect sync issues"
url: "https://hashnode.com/posts/querying-sql-endpoint-of-fabric-lakehousewarehouse-in-a-notebook-with-t-sql/66d8ae0a4c868ed76e2d7ce9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Querying SQL Endpoint of Fabric Lakehouse/Warehouse In A Notebook With T-SQL](https://fabric.guru/querying-sql-endpoint-of-fabric-lakehousewarehouse-in-a-notebook-with-t-sql?utm_source=hashnode&utm_medium=feed)

Cross workspace querying using the spark connector to detect sync issues

Sep 4, 2024 · 3 min read · fabric.guru  
Updated Jun 25, 2025  
Read the article

-   [#sql-endpoint](https://hashnode.com/tag/sql-endpoint)
-   [#microsoftfabric](https://hashnode.com/tag/microsoftfabric)
-   [#microsoft-fabric](https://hashnode.com/tag/microsoft-fabric)
-   [#lakehouse](https://hashnode.com/tag/lakehouse)
-   [#spark](https://hashnode.com/tag/spark)
-   [#t-sql](https://hashnode.com/tag/t-sql)

## Written by

[Sandeep Pawar](https://hashnode.com/@PawarBI)

@PawarBI

  
[View profile](https://hashnode.com/@PawarBI)

Building Data Analytics and Data Science solutions using Microsoft Fabric | Principal PM, Microsoft Fabric CAT

Principal Program Manager, Microsoft Fabric CAT helping users and organizations build scalable, insightful, secure solutions. Blogs, opinions are my own and do not represent my employer.

## Responses 1

Markdown supported · ⌘↵ to post

[German Munoz](https://hashnode.com/@GermanMunoz)

[Feb 26, 2025](https://hashnode.com/posts/querying-sql-endpoint-of-fabric-lakehousewarehouse-in-a-notebook-with-t-sql/66d8ae0a4c868ed76e2d7ce9/comment/67bf2f2cec0fcda9979ceefb)

Article is very useful and helped me reach my SQL end point. I am trying to create a function from this but my coding in scala is limited so I haven't been able to

[German Munoz](https://hashnode.com/@GermanMunoz)

[Feb 26, 2025](https://hashnode.com/posts/querying-sql-endpoint-of-fabric-lakehousewarehouse-in-a-notebook-with-t-sql/66d8ae0a4c868ed76e2d7ce9/comment/67bf2e4942d738421e1f2815)

Hey this code is awesome it has helped me implement my code. Thanks so much for sharing. I was able to reach my SQL end point and created queries directly from my notebook. So helpful, thank you! I have been trying to create a function or for loop with this code you provided but I have been struggling since its quite pro level. I was wondering if you had done this before or had any pointers? thank you again!

[Frithjof Vassbø](https://hashnode.com/@frithjof)

[Sep 5, 2024](https://hashnode.com/posts/querying-sql-endpoint-of-fabric-lakehousewarehouse-in-a-notebook-with-t-sql/66d8ae0a4c868ed76e2d7ce9/comment/66d9451f8f1fa93417d6e770)

Great article!

I think the Lakehouse.Contents() default behaviour is to query the SQL Analytics Endpoint, if querying a delta table in the Table section of the Lakehouse.

[reddit.com/r/MicrosoftFabric/s/55pqnnGhWz](https://www.reddit.com/r/MicrosoftFabric/s/55pqnnGhWz)

[reddit.com/r/MicrosoftFabric/s/PgWSz1bHwl](https://www.reddit.com/r/MicrosoftFabric/s/PgWSz1bHwl)

As you mention, and as Chris Webb wrote in the blog you linked to, using Value.Version can force it to bypass the SQL Analytics Endpoint. I guess query folding won't work then. And we would also need to know which table version number to query.
