run_sql
Run read-only SQL queries over Indian legislation and court judgment parquet files to filter and retrieve legal records by act, case, year, or text pattern.
Instructions
Run a read-only SELECT against one or more Open India Law parquet
files, referenced by the hf:// URIs from list_catalog, e.g.:
SELECT act_id, title, section_number, section_title
FROM read_parquet('hf://datasets/vaquill/open-india-law/in_central_legislation.parquet')
WHERE text ILIKE '%arbitration%' AND act_status = 'in_force'
ORDER BY year DESCOnly a single SELECT/WITH statement is allowed -- no DDL/DML, no
multiple statements. limit is capped at 200 rows regardless of what
the query asks for, since these files can be tens of GB and a filter
still has to scan every row group it can't rule out via column stats.
Narrow with a specific file (one court/state/regulator), a year range,
and an indexed-looking equality filter (act_id, case_id) wherever you
can -- it's the difference between a sub-second query and a slow scan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||