elasticsearch/docs/reference/esql/processing-commands/eval.asciidoc
Nik Everett 1f383f3cd2 Docs: compress results into query (ESQL-1259)
This compresses the results and the query on the page to take up less
space and make them more obviously connected.
2023-06-12 09:37:45 -05:00

29 lines
750 B
Text

[[esql-eval]]
=== `EVAL`
`EVAL` enables you to append new columns:
[source.merge.styled,esql]
----
include::{esql-specs}/docs.csv-spec[tag=eval]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/docs.csv-spec[tag=eval-result]
|===
If the specified column already exists, the existing column will be dropped, and
the new column will be appended to the table:
[source.merge.styled,esql]
----
include::{esql-specs}/docs.csv-spec[tag=evalReplace]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/docs.csv-spec[tag=evalReplace-result]
|===
[discrete]
==== Functions
`EVAL` supports various functions for calculating values. Refer to
<<esql-functions,Functions>> for more information.