Selects some values and discards the rest.
select (field|assignment)...Description
Section titled “Description”This operator keeps only the provided fields and drops the rest.
The field to keep. If it does not exist, it’s given the value null and a
warning is emitted.
assignment
Section titled “assignment”An assignment of the form <field>=<expr>.
Examples
Section titled “Examples”Select and create columns
Section titled “Select and create columns”Keep a and introduce y with the value of b:
from {a: 1, b: 2, c: 3}select a, y=b{a: 1, y: 2}A more complex example with expressions and selection through records:
from { name: "foo", pos: { x: 1, y: 2, }, state: "active",}select id=name.to_upper(), pos.x, added=true{ id: "FOO", pos: { x: 1, }, added: true,}