Version: v2.3 
CaseWhen
Sets values based on conditions
Type
transform
Fields
| Name | Title | Description |
|---|---|---|
| outputCol | Output Column Name | output column name |
| whenConditions | When Condition | When Condition |
| values | Value | Value when this condition is true |
| finallyElse | Else | else |
Examples
Input
| txid | itemid | date | pyid | amount |
|---|---|---|---|---|
| 1001 | 0001 | 2019-09-20 | 01 | 100 |
| 1002 | 0001 | 2019-09-20 | 02 | 100 |
Parameters
| When Condition | Value |
|---|---|
| amount >= 100.0 and amount < 200.0 | "high_value" |
| amount >=200.0 | "very_high_value" |
| Name | Value |
|---|---|
| Output Column Name | transaction_type |
| Else | "low-value" |
Output
| txid | itemid | date | pyid | amount | transaction_type |
|---|---|---|---|---|---|
| 1001 | 0001 | 2019-09-20 | 01 | 100 | high_value |
| 1002 | 0001 | 2019-09-20 | 02 | 100 | high_value |