OBJECT_DEPENDENCIES View

This ACCOUNT_USAGE view displays one row for each object dependency.

For example, while creating a view from a single table, the view is dependent on the table. Snowflake returns one row to record the dependency of the view on the table.

However, if creating the view is dependent on two tables, Snowflake returns one row to record the dependency of the view on the first table and, separately, one row to record the dependency of the view on the second table. This pattern continues for however many dependencies there are for a given object.

Columns

Column Name

Data Type

Description

REFERENCED_DATABASE

TEXT

The parent database of the referenced object.

REFERENCED_SCHEMA

TEXT

The parent schema of the referenced object.

REFERENCED_OBJECT_NAME

TEXT

The name of the referenced object.

REFERENCED_OBJECT_ID

NUMBER

The object ID of the referenced object.

REFERENCED_OBJECT_DOMAIN

TEXT

The domain (e.g. TABLE, VIEW) of the referenced object.

REFERENCING_DATABASE

TEXT

The parent database of the referencing object.

REFERENCING_SCHEMA

TEXT

The parent schema of the referencing object.

REFERENCING_OBJECT_NAME

TEXT

The name of the referencing object.

REFERENCING_OBJECT_ID

NUMBER

The object ID of the referencing object.

REFERENCING_OBJECT_DOMAIN

TEXT

The domain (e.g. TABLE, VIEW) of the referencing object.

DEPENDENCY_TYPE

TEXT

The type of dependency (BY_ID, BY_NAME, or BY_NAME_AND_ID).

Usage Notes

  • Latency for this view may be up to three hours.

  • For a complete list of supported objects and their dependency type, see Supported Object Dependencies.

  • This view was backfilled on January 22, 2022 to include dependencies prior to making the view available. Snowflake continues to record dependencies after this date.

    Note that if a view or UDF was invalid due to a missing dependency prior to this date and the missing dependency is fixed later, Snowflake does not record the dependency for the view or UDF.

    For example, if you created a view that depends on a table on December 1, 2021, dropped the table on the same day, and then undropped the table on February 1, 2022, Snowflake does not record that the view depends on the table.

    As a workaround, create or replace the view or UDF to so that this view records the dependency.

  • For details about the limitations of this view and how this view relates to other Snowflake features and objects, see:

Back to top