Skip to main content
POST
Validate an NQL statement

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
nql
string
required

A NQL query.

data_plane_id
string<uuid> | null

A dataplane represent where you would run the query. Your query get compiled to the SQL dialect that your data engine understands. If you leave it blank, your query will target Narrative's dataplane on AWS using Apache Spark. We currently support Snowflake and we plan to support other dataplanes in the future. See https://next.narrative.io/products/narrative-anywhere for more details.

Response

The statement is valid. The body is its AST, or an empty object for a MERGE statement, which has no AST representation.

The parsed statement as an AST. A MERGE statement has no AST representation and returns an empty object instead, as does a statement whose AST could not be serialized.

type
string
required
Allowed value: "agg_function"
nql
string
required

The text of the query fragment this node was parsed from.

args
array
required
name
string
required

The function name as written, for example SUM or COUNT.

as
string

The alias given with AS. Only present on aliased nodes: select-list expressions, FROM items and common table expressions. When it is present the node's nql is the full <expression> AS <alias> text.

quantifier
enum<string> | null

The ALL or DISTINCT quantifier, or null when none was written.

Available options:
all,
distinct,
null