How to Display Object Dependencies in Snowflake

This is a new Snowflake feature! In February 2022 Snowflake announced support for object dependencies for impact analysis in public preview. Most database object dependencies are now exposed through a metadata view. And just because it may be hard to understand a graph exposed in such a way, I came up with a small but practical Python utility to display this information in a more appropriate manner.

The Object Dependencies View

OBJECT_DEPENDENCIES is a new view added to the ACCOUNT_USAGE schema. The view returns pairs of dependencies between different Snowflake database objects. One object can depend on another by name (for example a view using another view or a table in its definition), or by an internal ID (for instance an external stage with its storage integration). And sometimes by both.

This is a great and useful feature, and database admins will be happy. Except that rendering a graph in a tabular format — as we don’t have another tool for now — would make the relationships hard to understand.

This is just one small part of my query result:

My Snowflake Object…

--

--

Cristian Scutaru
Snowflake Builders Blog: Data Engineers, App Developers, AI/ML, & Data Science

World-class expert in Snowflake Data Cloud. Former Snowflake "Data Superhero". SnowPro SME (Subject Matter Expert). 5x SnowPro certification exams.