As a data scientist, I want to be able to initialize and increment transient variables while processing a record using data preparation, so that I can perform iterative calculations while processing a record.
1. The lifetime of the transient variable should be a single record. When processing for a new record begins, the transient variable should not be available, until it is initialized again.
2. The transient variable should have separate conditions for initialization and increment.
1. Add a new menu item: Add Transient Variable.
2. Submenu should have 2 sections:
2a. Initialization: Accepts an initial value for a variable, and a JEXL expression, the result of which is assigned to the variable as an initial value.
Label: "Variable Name"
Placeholder: "E.g. count, index"
Label: "Initial value"
Placeholder: "E.g. math:round(temperature), 25, 44.90"
2b. Update: Accepts an increment value (defaults to 1) and a condition upon which the value is updated.
Label: "Increment By"
Widget: Number (defaults to 1)
Label: "Increment Condition"
Placeholder: "E.g. age > 25, first_name.startsWith("s")"