IF_ELSE
If there is a 'true' boolean value in the 'condition' parameter then return the second argument. In all other cases, return the third argument
Syntax
Arguments
Name | Type | Description | Default Value |
---|---|---|---|
condition | boolean | If this is true, return the second argument, otherwise return the third argument. | |
true_value | any | The value to return when the condition is true | |
false_value | any | The value to return when the condition is not true |
Examples
condition | true_value | false_value | Output |
---|---|---|---|
true | 'foo' | 'bar' |
|
false | 'foo' | 'bar' |
|
null::boolean | 'foo' | 'bar' |
|
Transformation job example
SQL
Query result
condition | true_value | false_value | Output |
---|---|---|---|
true | 'foo' | 'bar' |
|
Last updated