For the complete documentation index, see llms.txt. This page is also available as Markdown.

eval()

eval([...col = expression]) runs each expression and assigns it to the corresponding col.

expression supports any composition of scalar functions and operators.

Currently, scalar expressions can express more data types than table values can. Hence, at assignment, scalar expression values are converted back to table values as such:

  • numbers, strings, and null values are preserved

  • boolean values are converted to the strings "true" and "false"

  • arrays are converted to a string via JSON serialization

Returns

A same table as the input, with additional columns corresponding to the cols specified.

Examples

Get a list of HTTP 502s, converting the elapsed time from milliseconds to seconds.

response.status=502
| eval elapsed_s = request.elapsed_ms / 1000

Last updated

Was this helpful?