fields

Table of Contents

Definition

fields keeps or removes table columns depending on the stated criteria. By default, _raw and _time are included in the output.

Examples

To remove certain table columns from the output, use - before listing table columns' names. You don’t need to use comma between column names.

%dpl
| makeresults
| eval value1 = "1983.97", value2 = "remove me", value3 = "92.18"
| fields - value2
example of removing table columns

To keep certain table columns in the output, use + before listing table columns' names. You don’t need to use comma between column names.

%dpl
| makeresults
| eval value1 = "1983.97", value2 = "keep me", value3 = "92.18"
| fields + value2
example of keeping table columns

You can also use wildcard with column names.

%dpl
| makeresults
| eval value1 = "1983.97", value2 = "682.96", value3 = "92.18"
| fields + value*
Currently, wildcard doesn’t work in DPL. This will be fixed before the community release.

Further Reading