--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: ggsql excerpt: | DuckDB Community Extensions Bindings to ggsql — Grammar of Graphics based visualizations in SQL extension: name: ggsql description: Bindings to ggsql — Grammar of Graphics based visualizations in SQL version: 0.5.2 language: C++ build: cmake license: MIT maintainers: - thomasp85 requires_toolchains: "rust" # Rust dependencies pull in tiny_http, threads, and `open::that` — none of # which are viable under emscripten. Skip all wasm targets. excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads" repo: github: posit-dev/ggsql-duckdb ref: 2fde2fb16e38a175a19283bddcd9357b90bcae2a docs: hello_world: | SELECT 1 AS x, 2 AS y VISUALISE x, y DRAW point; extended_description: | ggsql extends DuckDB's SQL with the visual query language defined by ggsql (https://ggsql.org) to allow direct visualization from DuckDB. Results are served from an in-process HTTP server and opened in the default browser. The session setting `ggsql_output` switches to returning a URL, the raw vega-lite spec, or a self-contained HTML document instead. extension_star_count: 37 extension_star_count_pretty: 37 extension_download_count: 10608 extension_download_count_pretty: 10.6k image: '/images/community_extensions/social_preview/preview_community_extension_ggsql.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ✅ | ✅ | ❌ | | Linux ARM64 | ❌ | ❌ | ✅ | ✅ | ❌ | | macOS AMD64 | ❌ | ❌ | ✅ | ✅ | ❌ | | macOS ARM64 | ❌ | ❌ | ✅ | ✅ | ❌ | | Windows AMD64 | ❌ | ❌ | ✅ | ✅ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions | function_name | function_type | description | comment | examples | |---------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|----------------------------------------------------------------------------------------| | ggsql | scalar | Executes a ggsql query (SQL plus VISUALISE/DRAW clauses) and returns the plot in the format selected by the ggsql_output setting (browser URL, vega-lite spec, HTML, or SVG). | NULL | [ggsql('SELECT range AS x, range*range AS y FROM range(10) VISUALISE x, y DRAW line')] | | ggsql_run | table | Executes a ggsql query and returns the plot as a one-row table; used for binary output modes ('pdf', 'hep') where the result column is typed as BLOB. | NULL | [SELECT plot FROM ggsql_run('SELECT range AS x FROM range(10) VISUALISE x DRAW line')] | | ggsql_save | scalar | Renders a ggsql query straight to a file; the writer is inferred from the file extension (.svg, .pdf, .hep, .html, .json) and the output path is returned. | NULL | [ggsql_save('SELECT range AS x FROM range(10) VISUALISE x DRAW line', 'plot.svg')] | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings | name | description | input_type | scope | aliases | |----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|--------|---------| | ggsql_output | Output mode for ggsql queries. 'silent' (default) opens the browser and emits no rows; 'url' opens the browser and returns the plot URL; 'spec' returns the vega-lite JSON; 'html' returns a self-contained HTML document; 'svg' returns SVG text; 'pdf' and 'hep' return binary payloads (BLOB from ggsql_run). | VARCHAR | GLOBAL | [] | | ggsql_writer_options | Options for ggsql's writers, as semicolon-separated key=value pairs, e.g. 'width=800;height=600'. Applies to the 'svg', 'pdf', 'hep', 'html' modes and the browser display; must be empty for 'spec'. Shared keys: width, height, units, dpi, background. | VARCHAR | GLOBAL | [] |