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(if_exists: bool | None = None) None ΒΆ
Drop this view.
- Parameters:
if_exists (bool, optional) β Check the existence of this view before dropping it. Default is
None
, which is equivalent toFalse
.
Examples
Deleting a view using its reference:
>>> view_reference.drop()
Deleting a view using its reference if it exists:
>>> view_reference.drop(if_exists = True)