Skip to main content

Query Table

Filters, sorts, and projects columns from a table. Returns a new table with the results.

Category: Named Tables & Rules Engine · Group: Tables · Activity name: TableQuery

The TableQuery activity in the designer

Example

outputVariable = TableQuery("<tableName>", outputTable="<outputTable>", filters={}, orderBy={}, limit=0, columns={})

Inputs

NameTypeRequiredDefaultDescription
Table NamestringYesName of the table to query.
Output Table NamestringName for the result table. If omitted, overwrites the source table.
FiltersjsonFilter conditions as [{column, op, value}]. Operators: eq, neq, gt, gte, lt, lte, in, not_in, empty, not_empty, contains.
Order ByjsonSort specification as [{column, desc}]. desc is optional (default false).
LimitintegerMaximum number of rows to return.
ColumnsjsonColumn names to include in the result (projection). If omitted, all columns are included.

Outputs

NameTypeDescription
outputVariablejsonStores {tableName, columns: [...], rows: [...]} — the filtered rows as a binding. Use output.rows directly in expressions (e.g. filter(output.rows, ...), map(output.rows, .x)). Rows live in in-memory bindings; Temporal history stores only a count-only preview.