Skip to main content

Table Expressions

Table expressions are expressions that represent a query that returns a table output, similar to SQL. They are typically Table Functions combined using the AQL pipe operator.

Structure

model_name 
| table_function1 (optional)
| table_function2 (optional)
| ...

Examples

This table expresion is equivalent to select * from users in SQL:

users

Selecting a subset of fields:

users | select(users.id, users.gender)

Filtering data with filter function:

users
| filter(gender == 'Female')
| select(id, name)

There is no need for explicitly joins like in SQL for cross-model select:

users
| select(users.name, country.name)

Let us know what you think about this document :)