query
Run read-only SQL against a single tabular resource (DataStore, CSV, or JSON) to answer questions about Ukrainian open data; rows returned are capped.
Instructions
Run read-only SQL over one tabular resource (DataStore, CSV or JSON). The SQL always covers the whole resource or the call fails; only the returned rows are capped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only SELECT over the table `data`; CTEs allowed. | |
| limit | No | Max rows returned (default 20, hard max 100). | |
| dataset_id | Yes | Dataset id or name. | |
| resource_id | Yes | Resource id inside that dataset. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| note | No | ||
| rows | No | ||
| error | No | ||
| source | No | Provenance; always present when ok is true. | |
| columns | No | ||
| citation | No | One-line source note to include in the answer. | |
| row_limit | No | Server-enforced cap on returned rows. | |
| truncated | No | ||
| scope_note | No | ||
| returned_rows | No | ||
| rows_in_resource | No | Rows in the whole resource the SQL ran over. |