snowflake.snowpark.CaseExpr.when

CaseExpr.when(condition: Union[Column, str], value: Union[Column, None, bool, int, float, str, bytearray, Decimal, date, datetime, time, bytes, NaTType, float64, list, tuple, dict]) CaseExpr[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/column.py#L1438-L1468)

Appends one more WHEN condition to the CASE expression.

Parameters:
  • condition – A Column expression or SQL text representing the specified condition.

  • value – A Column expression or a literal value, which will be returned if condition is true.

Language: English