Skip to main content

SQL query visualization library with DuckDB backend and GUI support

Project description

sql2viz

Transform Raw SQL queries into visualizations using DuckDB and Iced.

Installation

[dependencies]
sql2viz = { version = "0.1", features = ["gui"] }

Usage

use sql2viz::vizcreate;

fn main() {
    let query = "SELECT 'A' as x, 10 as y UNION ALL SELECT 'B', 20";
    vizcreate(query.to_string()).unwrap();
}

Example with Database and CSV

use sql2viz::vizcreate;

fn main() {
    let queries = "
-- Connect to existing database
ATTACH 'mydata.db' AS mydb;

-- Query 1: Sales summary by category
SELECT category, SUM(amount) as total_sales
FROM mydb.sales
GROUP BY category
ORDER BY total_sales DESC;

-- Query 2: Load CSV file
SELECT * FROM 'test.csv' LIMIT 100;
";

    vizcreate(queries.to_string()).unwrap();
}

Screenshots

Table View

Chart View

Multiple Tabs

Features

  • SQL query execution with DuckDB
  • Interactive charts (Bar, Line, Area, Scatter)
  • Table view
  • Column selection for chart axes

License

MIT OR Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sql2viz-0.2.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sql2viz-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (11.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file sql2viz-0.2.0.tar.gz.

File metadata

  • Download URL: sql2viz-0.2.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.6

File hashes

Hashes for sql2viz-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c156a94ad8745dcae4ea87cb2129d51a76f26bf75f0cbc2ac64bc9a02f909dab
MD5 35a1106f40a09ff7b5017bf81d9129fa
BLAKE2b-256 18a9557d6106e9883c9cfee2aa0b9d6f6523a212072cb606394317214aecf785

See more details on using hashes here.

File details

Details for the file sql2viz-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sql2viz-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f314ea0614f598325fdf43ff47728d01ff1a60c282f3b6898504e05f2c7be44
MD5 a9e6358fe8a80c9b58fc72f21e51f468
BLAKE2b-256 4cc8d24bd985d2f378e110d36fc5257bd5781cf9ae8bb6193bfa818b1bc02de9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page