snowflake.core.event_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:
- event_table (EventTable) – - The details of EventTableobject, together withEventTable’s properties:
- name ; rows, columns are optional 
 
- The details of 
- copy_grants (bool, optional) – Whether to enable copy grants when creating the object. Default is - False.
- mode (CreateMode, optional) – - One of the below enum values. - CreateMode.error_if_exists: Throw an- snowflake.core.exceptions.ConflictErrorif the event table already exists in Snowflake. Equivalent to SQL- create event table <name> ....- CreateMode.or_replace: Replace if the event table already exists in Snowflake. Equivalent to SQL- create or replace event table <name> ....- CreateMode.if_not_exists: Do nothing if the event table already exists in Snowflake. Equivalent to SQL- create event table <name> if not exists...- Default value is - CreateMode.error_if_exists.
 
 - 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 - PollingOperationfor 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 Tableobjects from Snowflake, filtering on any optional ‘like’ pattern.- Parameters:
- like (str, optional) – A case-insensitive string functioning as a filter, with support for SQL wildcard characters (% and _). 
- starts_with (str, optional) – String used to filter the command output based on the string of characters that appear at the beginning of the object name. Uses case-sensitive pattern matching. 
- show_limit (int, optional) – Limit of the maximum number of rows returned by iter(). The default is - None, which behaves equivalently to show_limit=10000. This value must be between- 1and- 10000.
- from_name (str, optional) – Fetch rows only following the first row whose object name matches the specified string. This is case-sensitive and does not have to be the full name. 
 
 - 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 - PollingOperationfor more information on asynchronous execution and the return type.
 - keys() KeysView[str]¶
 - update_reference(old_name: str, new_name: str, resource: T) None¶
- Update the collection with a new item. 
 - values() ValuesView[T]¶