Query a connected table
query_tableA bounded, structured query over one table's current version. NO SQL: send columns, filters, order_by, aggregates, group_by and limit as JSON. Example: {"table_id": "0f2f...", "columns": ["observed_at", "air_temp_f"], "filters": [{"column": "air_temp_f", "operator": "gte", "value": 80}], "order_by": [{"column": "observed_at", "direction": "desc"}], "limit": 50}. Ceilings: 64 columns, 8 filters, 2 sort keys, 4 aggregates, 4 group keys, 10000 rows a page (25 when limit is omitted), 8 MiB of JSON. Every page answers with next_cursor; send it back as cursor (same columns, filters and order_by) for the next page until it is null, and you have read the whole table on one immutable version. Operators, all ANDed: eq, neq, in (an array of at most 20 values), gt, gte, lt, lte, is_null and is_not_null (no value), between (exactly two non-null bounds, inclusive at both ends), and contains, starts_with and ends_with (one non-empty string, case-sensitive, text columns only). Dates and timestamps compare as ISO strings, so a month is one between or a gte plus an lt. GROUPED AGGREGATES: send group_by beside aggregates for one row per distinct combination, keyed by the group column names and the aggregate aliases. Example: {"table_id": "0f2f...", "columns": ["station"], "group_by": ["station"], "aggregates": [{"function": "avg", "column": "air_temp_f", "as": "avg_temp"}], "order_by": [{"column": "avg_temp", "direction": "desc"}], "limit": 10}. An aggregate answers under its as, or under {function}{column or "all"}{position} without one. group_by needs at least one aggregate, no two result columns may share a name and names are compared without case (group_by ["city"] refuses an alias of "CITY", and two aggregates cannot share one alias), and order_by may only name a group column or an alias. limit counts GROUPS, execution.truncated means the limit was reached so there may be more groups, and a grouped answer has no next page: next_cursor is null and offset and cursor stay refused beside aggregates. Without group_by an aggregate query returns one row for the whole table and cannot be ordered. Requires an mr_use_ workspace key (Authorization: Bearer) or an OAuth connection. The first query over a dataset connects it to the workspace; connect_dataset makes that explicit but is not required. Returns rows plus table.version_id and table.content_digest; cite those. For the whole table in one request, download the Parquet instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| cursor | No | ||
| offset | No | ||
| columns | Yes | ||
| filters | No | ||
| group_by | No | ||
| order_by | No | ||
| table_id | Yes | ||
| aggregates | No |