Arize Query Language Syntax

Breakdown of the Arize Query Language

Custom Metric Syntax Overview

Custom metrics use an Arize SQL-like query language.

SELECT
< AGG_FUNC | METRIC_FUNC >(exprs) 
[FILTER (WHERE exprs)]  
[CASE WHEN ...END ]
[ <OPERATOR> { < AGG_FUNC | ARIZE_METRIC >(exprs) | constant }]  … 
FROM model
[WHERE (exprs) ]

SELECT

Every query starts with a SELECT statement.

FROM

The FROM statement should beFROM model, where model refers to the model that the custom metric was created under.

Constants

A constant can be a number or string. Strings use single quotes like this: 'this is a string'. Numbers can be floats or integers.

Expressions

dimension
constant
[ dimension | constant | (exprs) ] <OPERATOR> [ dimension | constant | (exprs) ]

An expression is a statement composed of simple math or boolean operators. An expression does not have an aggregation function within it. Expressions can include nested expressions, for example, A * (B + C). Expressions return the same number of rows as those that go into it.

Dimensions

A dimension is any feature, tag, prediction, actual, or span property of a model. A dimension can either be of type string or of type numeric.

Comments

Comments can be added to your query in one of two ways:

Single line comment (shortcut is CMD + /)

-- This is a single line comment

Multi-line comments

/* This
 * is a 
 * multiline comment
 */

Last updated

Copyright © 2023 Arize AI, Inc