snowflake.core.dynamic_table.DynamicTableResource¶

class snowflake.core.dynamic_table.DynamicTableResource(name: str, collection: DynamicTableCollection)¶

Bases: SchemaObjectReferenceMixin[DynamicTableCollection]

Represents a reference to a Snowflake dynamic table.

With this dynamic table reference, you can create, drop, undrop, suspend, resume, swap_with other table, suspend recluster, resume recluster and fetch information about dynamic tables, as well as perform certain actions on them.

Attributes

database¶
fully_qualified_name¶
root¶

Methods

delete() → None¶

The delete method is deprecated; use drop instead.

drop() → None¶

Drop the dynamic table.

Examples

Deleting a dynamic table using its reference:

>>> dynamic_table_reference.drop()
Copy
fetch() → DynamicTable¶

Fetch the details of a dynamic table.

Examples

Fetching a reference to a dynamic table to print its name and query properties:

>>> my_dynamic_table = dynamic_table_reference.fetch()
>>> print(my_dynamic_table.name, my_dynamic_table.query)
Copy
refresh() → None¶

Refresh the dynamic table.

Examples

Refreshing a dynamic table using its reference:

>>> dynamic_table_reference.refresh()
Copy
resume() → None¶

Resume the dynamic table.

Examples

Resuming a dynamic table using its reference:

>>> dynamic_table_reference.resume()
Copy
resume_recluster() → None¶

Enable reclustering the dynamic table.

Examples

Enable reclustering a dynamic table using its reference:

>>> dynamic_table_reference.resume_recluster()
Copy
suspend() → None¶

Suspend the dynamic table.

Examples

Suspending a dynamic table using its reference:

>>> dynamic_table_reference.suspend()
Copy
suspend_recluster() → None¶

Disable reclustering the dynamic table.

Examples

Disable reclustering a dynamic table using its reference:

>>> dynamic_table_reference.suspend_recluster()
Copy
swap_with(to_swap_table_name: str) → None¶

Swap the name with another dynamic table.

Parameters:

to_swap_table_name (str) – The name of the table to swap with.

Examples

Swaping name with another dynamic table using its reference:

>>> dynamic_table_reference.swap_with("my_other_dynamic_table")
Copy
undelete() → None¶

The undelete method is deprecated; use undrop instead.

undrop() → None¶

Undrop the previously dropped dynamic table.

Examples

Reverting delete a dynamic table using its reference:

>>> dynamic_table_reference.undrop()
Copy