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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
AJAJ
Helper III
Helper III

Find Dependency of Fabric Warehouse Table

In SQL Server, we could right click a table and see its dependencies. if its used by a view or stored procedure. We could also write queries to find its dependencies if a table is used inside a stored procedure. 

Is there any code or query i could use to find out if a fabric warehouse table is referred inside any SP or view? basically if any other object is using this warehouse table.

AJAJ_0-1768504720564.png

 

1 ACCEPTED SOLUTION
Ray_Minds
Continued Contributor
Continued Contributor

Answer : Yes we can do the dependency on the Table using Query  
We have a Date table with dbo schema. and i want to run the Query against Date table which is being used or not anywhere .

Ray_Minds_0-1768820522503.png

 

Run the Below Query : 

SELECT 

    OBJECT_SCHEMA_NAME(d.referencing_id) AS schema_name, 

    OBJECT_NAME(d.referencing_id)        AS object_name, 

    o.type_desc 

FROM sys.sql_expression_dependencies d 

JOIN sys.objects o 

    ON d.referencing_id = o.object_id 

WHERE d.referenced_entity_name = 'Date' 

  AND d.referenced_schema_name = 'dbo' 

UNION 

SELECT 

    s.name, 

    o.name, 

    o.type_desc 

FROM sys.sql_modules m 

JOIN sys.objects o ON m.object_id = o.object_id 

JOIN sys.schemas s ON o.schema_id = s.schema_id 

WHERE m.definition LIKE '%Date%'; 

Query Output :  
 

Ray_Minds_1-1768820522505.png

We able to find that Date table is being used in the View  

 [dbo].[vw_PaymentAnalysis] for Join  
 GetImage (1).png

View solution in original post

9 REPLIES 9
Ray_Minds
Continued Contributor
Continued Contributor

Answer : Yes we can do the dependency on the Table using Query  
We have a Date table with dbo schema. and i want to run the Query against Date table which is being used or not anywhere .

Ray_Minds_0-1768820522503.png

 

Run the Below Query : 

SELECT 

    OBJECT_SCHEMA_NAME(d.referencing_id) AS schema_name, 

    OBJECT_NAME(d.referencing_id)        AS object_name, 

    o.type_desc 

FROM sys.sql_expression_dependencies d 

JOIN sys.objects o 

    ON d.referencing_id = o.object_id 

WHERE d.referenced_entity_name = 'Date' 

  AND d.referenced_schema_name = 'dbo' 

UNION 

SELECT 

    s.name, 

    o.name, 

    o.type_desc 

FROM sys.sql_modules m 

JOIN sys.objects o ON m.object_id = o.object_id 

JOIN sys.schemas s ON o.schema_id = s.schema_id 

WHERE m.definition LIKE '%Date%'; 

Query Output :  
 

Ray_Minds_1-1768820522505.png

We able to find that Date table is being used in the View  

 [dbo].[vw_PaymentAnalysis] for Join  
 GetImage (1).png

Thanks @Ray_Minds . Am not near my system. Will this catch usage of table inside Stored procedures in warehouse? If this works, i will mark it as answer.

Ray_Minds
Continued Contributor
Continued Contributor

Yes , as of now i have tested with View where we were using the dbo.date table inside the view which is working as expected , it should work with Stored Procedure as well

Amazing Ray. Thats exactly i was looking for. Doesnt matter if its a work around. It helps to keep an eye on table sizes if they are ballooning.. i will mark it as answer.

v-sshirivolu
Community Support
Community Support

Hi @AJAJ ,

The issue is not with the query or permissions.
Microsoft Fabric Warehouse does not currently maintain or expose object dependency metadata like SQL Server. As a result, features such as "View Dependencies" and dependency DMVs are unavailable.

The only supported workaround is scanning object definitions (views and stored procedures) using OBJECT_DEFINITION() or maintaining dependencies through source control and naming standards.

 

Hey @v-sshirivolu  Good Morning ! , Thank you for your feedback.
We can have multple options its not working the way we are expecting as like another tools. Just provided the another way in case its not working 🙂

Hi @Ray_Minds ,
Thank you for the clarification.
I agree that there are various approaches, and such workarounds can be effective in certain cases.
I wanted to emphasize the current limitation in Fabric Warehouse regarding native dependency tracking, so that users are informed these methods may not always function as they do in other tools.

Hi @AJAJ ,

I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

 

KevinChant
Super User
Super User

You can see if this new offering will help. By my own admission yet to test it myself:

Fabric Data Lineage Dependency Visualizer - Microsoft Fabric Community

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

Check out the January 2026 Fabric update to learn about new features.

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.