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

snowflake.snowpark.WhenMatchedClause

class snowflake.snowpark.WhenMatchedClause(condition: Column | None = None)[source]

Bases: object

A matched clause for the Table.merge() action. It matches all remaining rows in the target Table that satisfy join_expr while also satisfying condition, if it is provided. You can use functions.when_matched() to instantiate this class.

Parameters:

condition – An optional Column object representing the specified condition.

Methods

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.