chembl-dataframe-query
chembl_dataframe_queryRun a read-only SQL SELECT over the bioactivity rows chembl_get_bioactivities spilled to a canvas — rank, group, dedupe, and aggregate across the FULL set, not the inline preview. Reference each staged table by the name chembl_get_bioactivities returned — bioactivities for its potency_ranked view, bioactivities_null_potency for null_potency; discover the staged tables and their columns with chembl_dataframe_describe. Compute honest aggregates here (e.g. SELECT molecule_chembl_id, MEDIAN(pchembl_value) AS med FROM bioactivities WHERE standard_type = 'IC50' GROUP BY 1 ORDER BY 2 DESC). Two independent bounds apply, each reported on its own field: truncated is true when the SQL result exceeded the canvas row cap, and rendered_rows says how many of the returned rows the markdown table holds once its character budget is reached (below row_count on a wide or long result). Page past either bound with SQL LIMIT/OFFSET — append e.g. LIMIT 500 OFFSET 500 and re-call; offsets reach rows beyond the canvas row cap. Requires CANVAS_PROVIDER_TYPE=duckdb.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A read-only SELECT against the staged tables. Reference tables by the names chembl_get_bioactivities returned. | |
| canvas_id | Yes | Canvas ID returned by chembl_get_bioactivities (spilled: true). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Result rows (capped at the canvas row limit). Each row is a column→value map. | |
| error | No | Present when the call failed. Absent on success. | |
| row_count | No | Number of rows materialized in this response. | |
| truncated | No | True when the SQL result exceeded the canvas row cap and was truncated — the engine bounding the result set itself, not the rendering. Independent of rendered_rows; page past it with LIMIT/OFFSET. | |
| rendered_rows | No | How many of those rows the markdown table in content[] holds. Below row_count when the rendered table reached its character budget — a rendering bound, INDEPENDENT of truncated: a response can be truncated:false and still render fewer rows than row_count. Re-run the same SQL with LIMIT/OFFSET to read the rows past it. |