You are viewing documentation about an older version (1.2.0). View latest version

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 create, update, and fetch information about event tables, as well as perform certain actions on them.

Attributes

databaseΒΆ
fully_qualified_nameΒΆ
rootΒΆ

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 to False.

Examples

Deleting this event table using its reference:

>>> event_table_reference.drop()
Copy

Deleting this event table if it exists:

>>> event_table_reference.drop(if_exists = True)
Copy
drop_async(if_exists: bool | None = None) β†’ PollingOperation[None]ΒΆ

An asynchronous version of drop().

Refer to PollingOperation for 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)
Copy
fetch_async() β†’ PollingOperation[EventTable]ΒΆ

An asynchronous version of fetch().

Refer to PollingOperation for 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")
Copy

Renaming this event table if it exists:

>>> event_table_reference.rename("my_other_event_table", if_exists = True)
Copy
rename_async(target_name: str, if_exists: bool | None = None) β†’ PollingOperation[None]ΒΆ

An asynchronous version of rename().

Refer to PollingOperation for more information on asynchronous execution and the return type.