Query staged drought data
drought_dataframe_queryRun one DuckDB read expression against staged drought tables, optionally ending with one semicolon. Get canvas_id from drought_get_timeseries or drought_compare_areas and inspect columns with drought_dataframe_describe. For every original row, SELECT * FROM the table ORDER BY row_id and follow next_offset until null. Arbitrary SQL pagination requires your own stable ORDER BY. Exact totals require SELECT COUNT(*).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One DuckDB read expression with an optional terminal semicolon; staged tables only. | |
| limit | No | Default 25 rows per page; values above 500 are clamped with disclosure. | |
| offset | No | Rows to skip in the stable ordered query. | |
| canvas_id | Yes | Token returned by a drought producer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | Requested maximum page rows. | |
| rows | No | Complete projected values on this page. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Complete rows shown on the truncated page. | |
| notice | No | Empty-result or continuation guidance. | |
| offset | No | Rows skipped by this query. | |
| columns | No | Projected column names in order. | |
| has_more | No | Whether another page remains. | |
| canvas_id | No | Supplied canvas token. | |
| truncated | No | More query rows remain beyond this page. | |
| limitNotice | No | Disclosure when the requested limit was clamped. | |
| next_offset | No | Continue with this offset and identical SQL, or null. | |
| countIsExact | No | True only when the page exhausts the query at offset zero. | |
| returnedCount | No | Number of rows returned. | |
| tableMetadata | No | Bounded table identity and source provenance. | |
| effectiveLimit | No | Effective page ceiling after clamping to 500. |