On this page
table command
Project down to specific fields for display or export.
Keeps only the named fields, in the order given, for display or export. fields and table are two names for the same stage.
Also written as fields, which behaves identically.
Syntax
ObiQL
| fields <field> [, <field> ...]
| table <field> [, <field> ...]Square brackets mark an optional part, and angle brackets a value you supply.
Arguments
| Argument | Required | Description |
|---|---|---|
<field>, ... | Required | The fields or result columns to keep, separated by commas or spaces. Quote a name that contains a space: "Total Errors". |
Usage
- After stats, only the by fields and the aggregate columns can be selected.
- Projection only changes what is shown and exported. Stored events are untouched.
Examples
1. A narrow view of events
ObiQL
service=checkout-api | fields timestamp, level, route, duration_msShows just these four columns.
2. Choose columns after stats
ObiQL
| stats count() by repository | fields repository, count()An aggregate can be named the way it was written, by its column name, or by its AS name.
3. Include an enriched column
ObiQL
| lookup hostname_map hostname AS host OUTPUT owner_team | fields host, owner_team, messageColumns added by lookup can be projected.