Query a dataset with SQL
query_datasetRun one read-only SQL statement over a dataset version on the server (requires auth): DuckDB reads the version's Parquet parts as the table records (extra fields of an allowExtra schema are the JSON column _extra). Use it for counts, averages and filters instead of paging through read_dataset. Limits: versions up to 2 GiB of parts, 20 seconds, 1000 rows returned (truncated says if more matched). The result size counts toward your egress; a paid dataset answers with its price.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | one SQL statement over the table `records` — e.g. SELECT target, avg(latency_ms) FROM records GROUP BY 1; DESCRIBE records shows the columns | |
| slug | Yes | ||
| limit | No | rows to return (default 200) | |
| version | No |