run_sql
Execute spatial SQL queries with DuckDB and ST_* functions to preview results or write full outputs as GeoParquet with provenance metadata.
Instructions
Run spatial SQL (DuckDB dialect, ST_* functions, read_parquet/ST_Read for files).
Without output_path: returns up to 50 preview rows. With output_path (.parquet): materializes the full result as GeoParquet with a provenance manifest. input_paths declares every dataset read; when omitted, the engine derives them from the query. Under MAPSMITH_WORKSPACE only SELECT runs, and coordinate systems (ST_Transform, ST_SetCRS) and dataset paths (ST_Read, read_parquet) must be string literals, so they can be checked before anything opens them; ST_Read takes there the formats whose coordinate system MapSmith reads first (GeoPackage, OGR SQLite and SpatiaLite with MapSmith-read SRS catalogues, shapefile, GeoParquet, GeoJSON, GML, FlatGeobuf, GeoTIFF, CSV...).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| input_paths | No | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||