Data and design
Query tables (DQL)
DQL is the query language for your data tables. Rules use it to look up values, functions call it with dql(...), and attributes take their options from it. Data Functions › Query Tables opens the DQL Runner, where you build, try and copy queries.
Build a query without typing it
The Builder puts a query together step by step:
- Primary Table: the table to read, with an Alias to refer to it.
- Join: further tables to combine with it, joined on a column of each.
- Select: the columns to return, or aggregates such as a count or a sum, each with an optional alias; or Use * for every column.
- Filters: conditions on columns, such as a size equal to a value or in a list (
value1, value2). - Group By, Sort By with a Direction, and a Limit.
The Generated Query shows the result as DQL; Copy it into a rule, function or attribute.

Write the query yourself
Switch to Raw to type a query directly:
SELECT c_motor, c_kw FROM Motors WHERE c_voltage = 400 ORDER BY c_kwInside a model, ${attributes.Name} inserts the current value of an attribute, so a query can follow the configuration:
SELECT c_price FROM PriceMatrix WHERE c_width = ${attributes.Width} AND c_material = ${attributes.Material}Write the placeholder without quotes: text values are quoted for you, numbers and true/false are inserted as they are, and an empty value becomes NULL. The placeholder works with attribute names made of letters, digits and underscores, so give attributes you query with one-word names such as Material or Shelf_Count.
Click Run to see the Result as a Table or as JSON, with the number of rows.
Reading and writing. Most queries read. DQL can also add, change and delete rows of a data table, with the matching permission for each, which is useful for maintenance in the DQL Runner. Queries for attribute options return the options to choose from.