The Type Converter Filter plugin allows to convert data type and append new key value pair.
This plugin is useful in combination with plugins which expect incoming string value. e.g. filter_grep, filter_modify
The plugin supports the following configuration parameters. It needs four parameters.
<config_parameter> <src_key_name> <dst_key_name> <dst_data_type>
dst_data_type allows int
, uint
, float
and string
.
e.g. int_key id id_str string
Key | Description |
---|---|
In order to start filtering records, you can run the filter from the command line or through the configuration file.
This is a sample in_mem record to filter.
The plugin outputs uint values and filter_type_converter converts them into string type.
You can also run the filter from command line.
The output will be
int_key
This parameter is for integer source.
uint_key
This parameter is for unsigned integer source.
float_key
This parameter is for float source.
str_key
This parameter is for string source.