Run SQL on Reservoir
reservoir_queryRun read-only DuckDB SQL over Reservoir Parquet archives, estimating downloads and enforcing a max_download_mb limit to control query cost.
Instructions
Run DuckDB SQL directly on the Reservoir bucket, exactly like the exploring-reservoir blog. Before running, estimates the download from the columns the query reads and refuses above max_download_mb. Only the Reservoir bucket and local Reservoir copies can be read. Prefer the dedicated tools for fills, candles, books and positions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only DuckDB SELECT over s3://hydromancer-reservoir/... paths, written as in the blog, e.g. SELECT ... FROM read_parquet('s3://hydromancer-reservoir/by_dex/xyz/fills/perp/all/date=2026-10-26/fills.parquet') WHERE coin = 'xyz:MSFT'. | |
| dry_run | No | Only estimate the download; do not run. | |
| max_rows | No | Rows to return (default 200). | |
| max_download_mb | No | Stop if the estimated download is larger than this many MB (default 1024). Raise it only if the user accepts the AWS cost. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||