Keep directive

The KEEP directive is used to keep specified columns in the record. This is the opposite behavior of the DROP directive.

Syntax

keep :column [,:column]*

column is the name of a column in the record to be kept.

Usage Notes

After the KEEP directive is applied, the column(s) specified in the directive are preserved, and all other columns are removed from the record.

Example

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:

 

Created in 2020 by Google Inc.