Delimited Parser
The DELIMITED parser plugin is used to take in a string and extract the fields when they are originally separated by a character. For example, taking in tab-delimited data and extracting each field.
Parameters
delimiter: OPTIONAL, the character that separates each field. If not provided, RioDB uses “tab” as the default delimiter.
record_delimiter: OPTIONAL, the character that separates each record, in case the payload is a batch of multiple records. If not provided, the default record delimiter is a newline character. Note that in some operating systems, that is different from a carriage return character.
skip_fields: OPTIONAL, it ignores certain incoming fields. For example, let’s say you stream providers records with 5 fields, but your RioDB stream only cares about 3, then you can instruct which 2 fields from the original record are not wanted and should be skipped.
Syntax
PARSER delimited (
delimiter <single char>
record_delimiter <single char>
skip_fields '<comma-separated integers>'
)
Example
To parse records like “session_id,request_type,reresponse_time”
02938470293847,POST,0.32
20938472304872,GET,0.1
2-304870238470,POST,0.42
You can use
PARSER delimited (
delimiter ','
)
If you don’t care about the first two fields:
PARSER delimited (
delimiter ','
skip_fields '1,2'
)
To parse records that are tab-delimited, records terminated by newline, you don’t need any properties, because it’s the plugin’s default settings:
PARSER delimited