snowflake.snowpark.functions.iff¶
- snowflake.snowpark.functions.iff(condition: Column | str, expr1: Column | None | bool | int | float | str | bytearray | Decimal | date | datetime | time | bytes | list | tuple | dict, expr2: Column | None | bool | int | float | str | bytearray | Decimal | date | datetime | time | bytes | list | tuple | dict) Column[source]¶
Returns one of two specified expressions, depending on a condition. This is equivalent to an
if-then-elseexpression.- Parameters:
condition – A
Columnexpression or SQL text representing the specified condition.expr1 – A
Columnexpression or a literal value, which will be returned ifconditionis true.expr2 – A
Columnexpression or a literal value, which will be returned ifconditionis false.
Examples: