SQLMesh GizmoSQL Adapter

April 17, 2026 ยท View on GitHub

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

OptionTypeDefaultDescription
hoststrlocalhostGizmoSQL server hostname
portint31337GizmoSQL server port
usernamestrNoneAuthentication username (not needed with auth_type: external)
passwordstrNoneAuthentication password (not needed with auth_type: external)
databasestrNoneDefault database/catalog
use_encryptionboolTrueUse TLS encryption
disable_certificate_verificationboolFalseSkip TLS cert verification
auth_typestrNoneAuthentication type (e.g., external for browser-based OAuth/SSO)
concurrent_tasksint4Max concurrent tasks
register_commentsboolTrueRegister model comments
pre_pingboolFalsePre-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