snowflake.core.table.TableResource¶
- class snowflake.core.table.TableResource(name: str, collection: TableCollection)¶
Bases:
SchemaObjectReferenceMixin
[TableCollection
]Represents a reference to a Snowflake Table resource.
Attributes
- database¶
- fully_qualified_name¶
- root¶
- schema¶
Methods
- __init__(name: str, collection: TableCollection) None ¶
- create_or_update(table: Table) None ¶
Create or update a table.
- Parameters:
table – The
Table
object, including the table’s properties, object parameters, columns, and constraints.
Notes
- Not currently implemented:
Row access policy
Column masking policy
Search optimization
Tags
Stage file format and copy options
Foreign keys.
Rename the table.
If the name and table’s name don’t match, an error will be thrown.
Rename or drop a column.
New columns can only be added to the back of the column list.
- delete() None ¶
Delete the table.
- fetch() Table ¶
Fetch the details of a table.
Notes
Inline constraints will become Outofline constraints because Snowflake database doesn’t tell whether a constraint is inline or out of line from Snowflake database.
- resume_recluster() None ¶
- suspend_recluster() None ¶
- swap_with(to_swap_table_name: str) None ¶
Swap the name with another table.
- undelete() None ¶
Undelete the previously deleted table.