snowflake.core.event_table.EventTableResource¶
- class snowflake.core.event_table.EventTableResource(name: str, collection: EventTableCollection)¶
Bases:
SchemaObjectReferenceMixin[EventTableCollection]Represents a reference to a Snowflake event table.
With this event table reference, you can fetch information about an event table, as well as perform certain actions on it.
Attributes
- database¶
The DatabaseResource this reference belongs to.
- fully_qualified_name¶
Return the fully qualified name of the object this reference points to.
- root¶
The Root object this reference belongs to.
Methods
- drop(if_exists: bool | None = None) None¶
Drop this event table.
- Parameters:
if_exists (bool, optional) – Check the existance of event_table before drop. The default value is
None, which is equivalent toFalse.
Examples
Deleting this event table using its reference:
>>> event_table_reference.drop()
Deleting this event table if it exists:
>>> event_table_reference.drop(if_exists=True)
- drop_async(if_exists: bool | None = None) PollingOperation[None]¶
An asynchronous version of
drop().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- fetch() EventTable¶
Fetch the details of an event table.
Examples
Fetching an event table reference to print its time of creation:
>>> print(event_table_reference.fetch().created_on)
- fetch_async() PollingOperation[EventTable]¶
An asynchronous version of
fetch().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- get_tags(with_lineage: bool | None = None) dict[TagResource, TagValue]¶
Get the tag assignments for an event table.
Returns all tags assigned to an event table. This operation requires an active warehouse.
- Parameters:
with_lineage (bool, optional) – Parameter that specifies whether tag assignments inherited by the object from its ancestors in securable object hierarchy should be returned as well: - true: All tags assigned to this object should be returned, inheritance included. - false: Only tags explicitly assigned to this object should be returned.
- get_tags_async(with_lineage: bool | None = None) PollingOperation[dict[TagResource, TagValue]]¶
An asynchronous version of
get_tags().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- rename(target_name: str, if_exists: bool | None = None) None¶
Rename this event table.
- Parameters:
target_name (str) – The new name of the event table
if_exists (bool, optional) – Check the existence of event table before rename
Examples
Renaming this event table using its reference:
>>> event_table_reference.rename("my_other_event_table")
Renaming this event table if it exists:
>>> event_table_reference.rename("my_other_event_table", if_exists=True)
- rename_async(target_name: str, if_exists: bool | None = None) PollingOperation[None]¶
An asynchronous version of
rename().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- set_tags(tags: dict[TagResource, TagValue], if_exists: bool | None = None) None¶
Set tags on an event table.
- Parameters:
tags (dict[TagResource, TagValue]) – (required)
if_exists (bool) – Parameter that specifies how to handle the request for a resource that does not exist: - true: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. - false: The endpoint throws an error if the resource doesn’t exist.
- set_tags_async(tags: dict[TagResource, TagValue], if_exists: bool | None = None) PollingOperation[None]¶
An asynchronous version of
set_tags().Refer to
PollingOperationfor more information on asynchronous execution and the return type.
- unset_tags(tag_resources: set[TagResource], if_exists: bool | None = None) None¶
Unset tags from an event table.
- Parameters:
tag_resources (set[TagResource]) – (required)
if_exists (bool) – Parameter that specifies how to handle the request for a resource that does not exist: - true: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. - false: The endpoint throws an error if the resource doesn’t exist.
- unset_tags_async(tag_resources: set[TagResource], if_exists: bool | None = None) PollingOperation[None]¶
An asynchronous version of
unset_tags().Refer to
PollingOperationfor more information on asynchronous execution and the return type.