The KEEP directive is used to keep specified columns in the record. This is the opposite behavior of the DROP directive.
keep :column [,:column]* |
column
is the name of a column in the record to be kept.
After the KEEP directive is applied, the column(s) specified in the directive are preserved, and all other columns are removed from the record.
Using this record as an example:
{ "id": 1, "timestamp": 1234434343, "measurement": 10.45, "isvalid": true } |
Applying this directive:
keep :id,:measurement |
results in this record:
{ "id": 1, "measurement": 10.45 } |