-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Our existing SQL documentation works but is tricky to keep up-to-date with changes to sedona-functions!
sedona-db/docs/reference/sql.md
Lines 20 to 26 in 11e2993
| # SQL API Reference | |
| The following SQL functions are available for SedonaDB. | |
| You can query data directly from files and URLs by treating them like database tables. This feature supports formats like **Parquet**, **CSV**, and **JSON**. | |
| To query a file, place its path or URL in single quotes within the `FROM` clause. |
This file was initially generated from the documentation we've been keeping inline in the functions themselves. For example:
sedona-db/rust/sedona-functions/src/st_dimension.rs
Lines 41 to 50 in 11e2993
| fn st_dimension_doc() -> Documentation { | |
| Documentation::builder( | |
| DOC_SECTION_OTHER, | |
| "Return the dimension of the geometry", | |
| "ST_Dimension (A: Geometry)", | |
| ) | |
| .with_argument("geom", "geometry: Input geometry") | |
| .with_sql_example("SELECT ST_Dimension(ST_GeomFromWKT('POLYGON EMPTY'))") | |
| .build() | |
| } |
We can recreate the script we used to generate the initial reference section to ensure we keep this all up to date (and potentially generate reference pages for R and Python when we have function wrappers there). Alternatively we could go in the other direction (have extremely carefully formatted markdown reference that we parse into Rust, R, and Python documentation).
It would also be great to have one page per function to allow these pages room to grow as we accumulate experience and examples with these functions!