GizmoSQL - an Arrow Flight SQL Server with DuckDB and SQLite back-ends
100K+
GizmoSQL is a lightweight, high-performance SQL server built on:
Originally forked from sqlfliteβ β and now enhanced into a more extensible, production-ready platform under the Apache 2.0 license.
GizmoSQL is available in two editions:
| Feature | Core | Enterprise |
|---|---|---|
| DuckDB & SQLite backends | β | β |
| Arrow Flight SQL protocol | β | β |
| TLS & mTLS authentication | β | β |
| JWT token authentication | β | β |
| Query timeout | β | β |
| Session Instrumentation | β | β |
| Kill Session | β | β |
| Per-Catalog Permissions | β | β |
| SSO/OIDC Authentication (JWKS) | β | β |
| Authorized Email Filtering | β | β |
| Statement Queuing | β | β |
GizmoSQL Core is free and open source under the Apache 2.0 license.
GizmoSQL Enterprise requires a commercial license. Contact [email protected]β for licensing information.
For more details, see the Editions documentationβ .
| Component | Version |
|---|---|
| DuckDBβ | v1.5.4 |
| SQLiteβ | 3.53.1 |
| Apache Arrow (Flight SQL)β | 23.0.1 |
| jwt-cppβ | v0.7.2 |
| OpenTelemetry C++β | v1.25.0 |
| nlohmann/jsonβ | v3.12.0 |
For detailed instructions and configuration information, see our full documentation:
Default credentials: The server's default username is
gizmosql_user(override with--usernameorGIZMOSQL_USERNAME). A password is always required via--passwordorGIZMOSQL_PASSWORD.
# Username defaults to "gizmosql_user" when GIZMOSQL_USERNAME is not set
docker run --name gizmosql \
--detach \
--rm \
--tty \
--init \
--publish 31337:31337 \
--env TLS_ENABLED="1" \
--env GIZMOSQL_PASSWORD="gizmosql_password" \
--env PRINT_QUERIES="1" \
--pull always \
gizmodata/gizmosql:latest
duckdb ./tpch_sf1.duckdb << EOF
INSTALL tpch; LOAD tpch; CALL dbgen(sf=1);
EOF
docker run --name gizmosql \
--detach \
--rm \
--tty \
--init \
--publish 31337:31337 \
--env TLS_ENABLED="1" \
--env GIZMOSQL_PASSWORD="gizmosql_password" \
--pull always \
--mount type=bind,source=$(pwd),target=/opt/gizmosql/data \
--env DATABASE_FILENAME="data/tpch_sf1.duckdb" \
gizmodata/gizmosql:latest
brew tap gizmodata/tap
brew install gizmosql
Supported platforms:
Then run the server (username defaults to gizmosql_user):
GIZMOSQL_PASSWORD="gizmosql_password" gizmosql_server --database-filename your.duckdb --print-queries
Download the latest MSI installer from the GitHub Releasesβ page β GizmoSQL-amd64.msi for x64 machines, or GizmoSQL-arm64.msi for Windows on Arm (e.g. Snapdragon X-class devices). The installer adds gizmosql_server.exe and gizmosql_client.exe to C:\Program Files\GizmoSQL and updates the system PATH.
Then run the server from PowerShell or Command Prompt:
$env:GIZMOSQL_PASSWORD="gizmosql_password"
gizmosql_server --database-filename your.duckdb --print-queries
GizmoSQL is available as a native iOS app on the Apple App Store β run a full GizmoSQL server right on your iPhone or iPad.
The iOS edition bundles the DuckDB engine and the Arrow Flight SQL server, so any GizmoSQL client (JDBC, ADBC, CLI, UI, etc.) can connect to it over your local network.
Important
**The iOS app is intended for development, learning, demos, and local prototyping β not production workloads.** iOS enforces aggressive background execution limits, memory caps, and network/thermal throttling that make a phone or tablet unsuitable for hosting production SQL traffic. For production, run GizmoSQL via Docker, Kubernetes, Homebrew, or the native Linux/macOS/Windows binaries.
Use with DBeaver or other JDBC clients:
jdbc:gizmosql://localhost:31337?useEncryption=true&user=gizmosql_user&password=gizmosql_password&disableCertificateVerification=true
More info: Setup guideβ
Prerequisite: Python 3.10+ and the GizmoSQL ADBC driverβ :
pip install adbc-driver-gizmosql
The driver also supports OAuth/SSO authentication for GizmoSQL Enterprise users.
from adbc_driver_gizmosql import dbapi as gizmosql
with gizmosql.connect(
"grpc+tls://localhost:31337",
username="gizmosql_user",
password="gizmosql_password",
tls_skip_verify=True, # Not needed if you use a trusted CA-signed TLS cert
) as conn:
with conn.cursor() as cur:
cur.execute(
"SELECT n_nationkey, n_name FROM nation WHERE n_nationkey = ?",
parameters=[24],
)
x = cur.fetch_arrow_table()
See: https://github.com/gizmodata/generate-gizmosql-tokenβ for an example of how to generate a token and use it with GizmoSQL.
GizmoSQL ships with an interactive SQL shell inspired by psql and the DuckDB CLI:
# Interactive session
GIZMOSQL_PASSWORD="gizmosql_password" gizmosql_client --host localhost --username gizmosql_user --tls --tls-skip-verify
Run a single query with --command:
GIZMOSQL_PASSWORD="gizmosql_password" gizmosql_client \
--host localhost --username gizmosql_user --tls --tls-skip-verify \
--command "SELECT version()"
Pipe SQL from a heredoc:
GIZMOSQL_PASSWORD="gizmosql_password" gizmosql_client \
--host localhost --username gizmosql_user --tls --tls-skip-verify --quiet <<'EOF'
SELECT n_nationkey, n_name
FROM nation
WHERE n_nationkey = 24;
EOF
More info: Client Shell documentationβ
git clone https://github.com/gizmodata/gizmosql --recurse-submodules
cd gizmosql
cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build build --target install
Then run:
GIZMOSQL_PASSWORD="..." gizmosql_server --database-filename ./data/your.db --print-queries
INIT_SQL_COMMANDS or INIT_SQL_COMMANDS_FILE# DuckDB (default)
gizmosql_server -B duckdb --database-filename data/foo.duckdb
# SQLite
gizmosql_server -B sqlite --database-filename data/foo.sqlite
Tip
You can now use the: `--query-timeout` argument to set a maximum query timeout in seconds for the server. Queries running longer than the timeout will be killed. The default value of: `0` means "unlimited". Example: `gizmosql_server (other args...) --query-timeout 10` will set a timeout of 10 seconds for all queries.
Tip
The health check query can be customized using `--health-check-query` or the `GIZMOSQL_HEALTH_CHECK_QUERY` environment variable. The default is `SELECT 1`. This is useful when you need a more specific health check for your deployment. Example: `gizmosql_server (other args...) --health-check-query "SELECT 1 FROM my_table LIMIT 1"`
π‘ On Azure VM Standard_E64pds_v6 (~$3.74/hr):
π Speed for the win. Performance for pennies.
GizmoSQL Core is licensed under the Apache License, Version 2.0β .
Enterprise features (in src/enterprise/) are proprietary and require a commercial license from GizmoData LLC. See src/enterprise/LICENSEβ for details.
Questions or consulting needs?
π§ [email protected]β
π https://gizmodata.comβ
Built with β€οΈ by GizmoDataβ’β
Content type
Image
Digest
sha256:aa11705e3β¦
Size
616.3 MB
Last updated
7 days ago
docker pull gizmodata/gizmosql