snowflake.snowpark.functions.nvl2¶
- snowflake.snowpark.functions.nvl2(expr1: Union[snowflake.snowpark.column.Column, str], expr2: Union[snowflake.snowpark.column.Column, str], expr3: Union[snowflake.snowpark.column.Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.45.0/src/snowflake/snowpark/_functions/scalar_functions.py#L1238-L1272)¶
Returns expr2 if expr1 is not None, otherwise returns expr3.
- Parameters:
expr1 (ColumnOrName) – The expression to test for None.
expr2 (ColumnOrName) – The value to return if expr1 is not None.
expr3 (ColumnOrName) – The value to return if expr1 is None.
- Returns:
The result of the nvl2 function.
- Return type:
Example: