#
cast
Convert fields into some common types. If a field doesn't exist in the event, it is ignored. Null values are preserved as null.
#
Config
Required:
fields: Mapping of field names to target types
Supported Types:
int- Converts to integerfloat- Converts to floating-point numberbool- Converts to booleants-sec- Converts seconds-since-epoch to moment timestampts-msec- Converts milliseconds-since-epoch to moment timestampts-usec- Converts microseconds-since-epoch to moment timestamp
#
Example
pipeline:
cast:
config:
fields:
response_time: float
status_code: int
success: bool
created_at: ts-sec