values
Operator
values — emit values from expressions
Synopsis
[values] <expr> [, <expr>...]
Description
The values
operator produces output values by evaluating one or more
expressions on each input value and sending each result to the output
in left-to-right order. Each <expr>
may be any valid
expression.
The values
keyword is optional since it is an
implied operator.
Examples
Hello, world
values "hello, world"
null
Loading...
echo 'null' \
| super -s -c 'values "hello, world"' -
Values evaluates each expression for every input value
values 1,2
null
null
null
Loading...
echo 'null
null
null' \
| super -s -c 'values 1,2' -
Values typically operates on its input
values this*2+1
1
2
3
Loading...
echo '1
2
3' \
| super -s -c 'values this*2+1' -
Values is often used to transform records
Values [a,b],[b,a] | collect(this)
{a:1,b:2}
{a:3,b:4}
Loading...
echo '{a:1,b:2}
{a:3,b:4}' \
| super -s -c 'Values [a,b],[b,a] | collect(this)' -