Mutate Type
Mutates the type of a value in the record.
Example
This example shows how to use the MutateType transformation to change the type of a value in a record.
{
"operation": "mutate_type",
"arguments": {
"key": "field1",
"type": "integer"
}
}
Given the input record:
{
"field1": "123",
"another_field": "another_value"
}
The output record will be:
{
"field1": 123,
"another_field": "another_value"
}
This example shows how to change the type to a boolean:
{
"operation": "mutate_type",
"arguments": {
"key": "field2",
"type": "boolean"
}
}
Given the input record:
{
"field2": "true",
"another_field": "another_value"
}
The output record will be:
{
"field2": true,
"another_field": "another_value"
}