snowflake.core.view.ViewResourceΒΆ

class snowflake.core.view.ViewResource(name: Annotated[str, Strict(strict=True)], collection: ViewCollection)ΒΆ

Bases: SchemaObjectReferenceMixin[ViewCollection]

Represents a reference to a Snowflake view.

With this view reference, you can drop and fetch information about views.

Attributes

databaseΒΆ
fully_qualified_nameΒΆ
rootΒΆ

Methods

drop() β†’ NoneΒΆ

Drop this view.

Examples

Deleting a view using its reference:

>>> view_reference.drop()
Copy
fetch() β†’ ViewΒΆ

Fetch the details of a view.

Examples

Fetching a reference to a view to print its name and query properties:

>>> my_view = view_reference.fetch()
>>> print(my_view.name, my_view.query)
Copy