snowflake.core.event_table.EventTableCollection | Snowflake Documentation (original) (raw)

DeveloperSnowflake Python APIsSnowflake Python APIs referenceevent_tableevent_table.EventTableCollection

class snowflake.core.event_table.EventTableCollection(schema: SchemaResource)

Bases: SchemaObjectCollectionParent[EventTableResource]

Represents the collection operations on the Snowflake Event Table resource.

With this collection, you can create, iterate through, and fetch event tables that you have access to in the current context.

Initialize collection for Event Table.

Attributes

database

The DatabaseResource this collection belongs to.

root

The Root object this collection belongs to.

Methods

create(event_table: EventTable, *, mode: CreateMode = CreateMode.error_if_exists, copy_grants: bool | None = False) → EventTableResource

Create an event table in Snowflake.

Parameters:

Examples

Create an Event Table instance:

event_tables = schema.event_tables event_tables.create(new_event_table)

create_async(event_table: EventTable, *, mode: CreateMode = CreateMode.error_if_exists, copy_grants: bool | None = False) → PollingOperation[EventTableResource]

An asynchronous version of create().

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

items() → ItemsView[str, T]

iter(*, like: str | None = None, starts_with: str | None = None, show_limit: int | None = None, from_name: str | None = None) → Iterator[EventTable]

Iterate through Event Table objects from Snowflake, filtering on any optional ‘like’ pattern.

Parameters:

Examples

Showing all event tables that you have access to see:

event_tables = event_table_collection.iter()

Showing information of the exact event table you want to see:

event_tables = event_table_collection.iter(like="your-event-table-name")

Showing event tables starting with ‘your-event-table-name-‘:

event_tables = event_table_collection.iter(like="your-event-table-name-%")

Using a for loop to retrieve information from iterator:

for event_table in event_tables: ... print(event_table.name)

iter_async(*, like: str | None = None, starts_with: str | None = None, show_limit: int | None = None, from_name: str | None = None) → PollingOperation[Iterator[EventTable]]

An asynchronous version of iter().

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

keys() → KeysView[str]

values() → ValuesView[T]