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

Table

Classes

DeleteResult(rows_deleted)

Result of deleting rows in a Table.

MergeResult(rows_inserted, rows_updated, ...)

Result of merging a DataFrame into a Table.

Table(table_name[, session])

Represents a lazily-evaluated Table.

UpdateResult(rows_updated[, ...])

Result of updating rows in a Table.

WhenMatchedClause([condition])

A matched clause for the Table.merge() action.

WhenNotMatchedClause([condition])

A not-matched clause for the Table.merge() action.

Methods

delete()

Deletes rows in a Table and returns a DeleteResult, representing the number of rows deleted.

drop_table()

Drops the table from the Snowflake database.

merge()

Merges this Table with DataFrame source on the specified join expression and a list of matched or not-matched clauses, and returns a MergeResult, representing the number of rows inserted, updated and deleted by this merge action.

sample([frac, n, seed, sampling_method])

Samples rows based on either the number of rows to be returned or a percentage of rows to be returned.

update()

Updates rows in the Table with specified assignments and returns a UpdateResult, representing the number of rows modified and the number of multi-joined rows modified.

delete()

Defines a delete action for the matched clause and returns an updated WhenMatchedClause with the new delete action added.

update(assignments)

Defines an update action for the matched clause and returns an updated WhenMatchedClause with the new update action added.

insert(assignments)

Defines an insert action for the not-matched clause and returns an updated WhenNotMatchedClause with the new insert action added.

Attributes

rows_deleted

The number of rows deleted.

rows_deleted

The number of rows deleted.

rows_inserted

The number of rows inserted.

rows_updated

The number of rows updated.

is_cached

Whether the table is cached.

table_name

The table name

multi_joined_rows_updated

The number of multi-joined rows modified.

rows_updated

The number of rows modified.