Transform Fields
Map a selection of fields through a function
Processing
The step passes a selection field values through a function.
Each field value x
is replaced by f(x)
where f
is the configured function.
The transformed values are written back to the original fields.
Function
Function to map field values through.
Function must accept 1, 2, 3, or 4 arguments.
args | form |
---|---|
1 | (x) -> any |
2 | (x, field_name) -> any |
3 | (x, field_name, in_type) -> any |
4 | (x, field_name, in_type, out_type) -> any |
Depending on the number of paramters declared up to four arguments are passed in: field value, field name, input field type, and output field type.
The returned value is the new value for the field.
Evaluated for each input row
Fields
Selection of fields to transform.
Each field may switch to a new data type.
Values returned from the transformation function are automatically cast to the new type.
Results
This step does not provide any results.