Skip to main content

GizmoSQL engine adapter for SQLMesh

Project description

SQLMesh GizmoSQL Adapter

A SQLMesh engine adapter for GizmoSQL - a database server that uses DuckDB as its execution engine and exposes an Arrow Flight SQL interface for remote connections.

sqlmesh-gizmosql-ci Supported Python Versions PyPI version PyPI Downloads

Installation

pip install sqlmesh-gizmosql

This will install sqlmesh and adbc-driver-gizmosql as dependencies.

Usage

1. Import the adapter

Simply import the package before using SQLMesh. The adapter registers itself automatically:

import sqlmesh_gizmosql  # Registers GizmoSQL adapter
from sqlmesh import Context

context = Context(paths="path/to/project")

2. Configure your connection

Add a GizmoSQL connection to your config.yaml:

gateways:
  my_gizmosql:
    connection:
      type: gizmosql
      host: localhost
      port: 31337
      username: your_username
      password: your_password
      database: my_database  # optional, default catalog
      use_encryption: true   # default: true (uses TLS)
      disable_certificate_verification: false  # for self-signed certs

3. Use SQLMesh as normal

sqlmesh plan
sqlmesh run

Configuration Options

Option Type Default Description
host str localhost GizmoSQL server hostname
port int 31337 GizmoSQL server port
username str None Authentication username (not needed with auth_type: external)
password str None Authentication password (not needed with auth_type: external)
database str None Default database/catalog
use_encryption bool True Use TLS encryption
disable_certificate_verification bool False Skip TLS cert verification
auth_type str None Authentication type (e.g., external for browser-based OAuth/SSO)
concurrent_tasks int 4 Max concurrent tasks
register_comments bool True Register model comments
pre_ping bool False Pre-ping connections

OAuth/SSO Authentication

GizmoSQL supports browser-based OAuth/SSO via auth_type: external. When using external auth, no username or password is needed — a browser window will open for authentication:

gateways:
  my_gizmosql:
    connection:
      type: gizmosql
      host: gizmosql.example.com
      port: 31337
      auth_type: external
      disable_certificate_verification: true  # for self-signed certs

Features

  • Arrow Flight SQL: Efficient data transfer using Arrow's columnar format
  • Full Catalog Support: Create, drop, and switch between databases
  • Transaction Support: Full transaction control via SQL statements
  • ADBC Bulk Ingestion: Fast data loading using Arrow-native bulk operations
  • DuckDB Compatibility: Uses DuckDB SQL dialect for query generation

Requirements

  • Python >= 3.10
  • SQLMesh >= 0.100.0
  • A running GizmoSQL server with DuckDB backend

Development

# Clone the repository
git clone https://github.com/gizmodata/sqlmesh-gizmosql.git
cd sqlmesh-gizmosql

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
ruff check .
mypy sqlmesh_gizmosql

License

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

sqlmesh_gizmosql-0.2.5.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

sqlmesh_gizmosql-0.2.5-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file sqlmesh_gizmosql-0.2.5.tar.gz.

File metadata

  • Download URL: sqlmesh_gizmosql-0.2.5.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sqlmesh_gizmosql-0.2.5.tar.gz
Algorithm Hash digest
SHA256 76f4c00f7f00a71392b66c7779a7905d2e61e06b99a47c3aefb413282c1e6853
MD5 5aec82e43ecfadceda08895d99a988f3
BLAKE2b-256 7605eb8fb7dd7e4c1a2e48857fcf9aa753a204d28efb3b6c885aee9036759c34

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqlmesh_gizmosql-0.2.5.tar.gz:

Publisher: ci.yml on gizmodata/sqlmesh-gizmosql

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sqlmesh_gizmosql-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlmesh_gizmosql-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 334f8b73986f0fd50fbef89f61db391ff0f7a9eba010f48a3924ef4d0ae1b12d
MD5 5dfc41ea8a1a441e64703c3b34c389a4
BLAKE2b-256 8fb3ccd7a58bb875c57dfa236bea1761e73a487ffe5b137fc1dfbdafc3749d12

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqlmesh_gizmosql-0.2.5-py3-none-any.whl:

Publisher: ci.yml on gizmodata/sqlmesh-gizmosql

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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