fields
Selects only the specified fields or excludes the specified fields from output.
Command properties
| Item | Description |
|---|---|
| Command type | Transforming |
| Required permission | None |
| License usage | N/A |
| Parallel execution | Supported |
| Distributed execution | Not supported |
Syntax
fields [-] FIELD [, FIELD ...]
Options
-- Minus sign. When specified, outputs all fields except the listed ones. When omitted, outputs only the listed fields.
FIELD- Name of the field to select or exclude. Specify multiple fields separated by commas (
,). You must specify at least one field.
Error codes
Parse errors
| Error code | Message | Description |
|---|---|---|
| 20400 | 필드 이름이 없습니다. | No field name is specified |
Description
The fields command selects or excludes fields to output. Without the minus sign (-), only the listed fields are output. With the minus sign, all fields except the listed ones are output.
Examples
-
Output only specific fields
table duration=1h FW_ASA | fields src_ip, dst_ip, actionOutputs only the
src_ip,dst_ip, andactionfields. -
Output all fields except specific ones
table duration=1h WEB_APACHE | fields - lineOutputs all fields except the
linefield.