Skip to main content
POST

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: "select"
nql
string
required

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

columns
array
required
group_by
array
required
is_distinct
boolean
required
order_by
array
required
windows
array
required

Named windows declared in a WINDOW clause.

with
array
required

The common table expressions of a WITH clause. Each is a select node whose as is the CTE name.

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.

from
any | null

The FROM item, or null for a select with no FROM clause.

having
unknown
limit
unknown
qualify
unknown
where
unknown