Skip to main content

Install once, then call it from SQL

The extension adds ordinary SQL functions, with nothing to import at the call site. Install it once (left), then hand any query's data to kuva_render and get an SVG chart back (right).

duckdb
-- once per installation, then once per session
INSTALL duckfn_kuva FROM community;
LOAD duckfn_kuva;
duckdb
SELECT kuva_render('{"series":[{"type":"scatter","data":[[1,2],[3,4],[5,3]]}]}');
-- an SVG document
SELECT kuva_render('{"series":[]}');
-- error: kuva_render: `series` must not be empty: a single-figure chart needs at least one series

The comments are what each call returns \u2014 the first is the SVG a chart renders to, the second is how a bad spec fails.

The full function reference