SQLMesh Hardcharger™ Adapter
Run SQLMesh transformations on Hardcharger™, GizmoData's DuckDB 2.0 server. Connect using the native Hardcharger ADBC driver over Warp SQL HTTP(S).
Install
pip install sqlmesh-hardcharger
Python 3.11 or later. Installs SQLMesh 0.236.4 (compatible 0.236.x releases) and adbc-driver-hardcharger>=2.0.2,<3. SQLGlot stays within SQLMesh's supported 30.8.x range. The local DuckDB package is SQLMesh's dependency; remote queries execute on the Hardcharger server's DuckDB 2.0 engine.
Quick start
Add config.yaml to your SQLMesh project:
gateways:
hardcharger:
connection:
type: hardcharger
host: localhost
port: 31337
username: "{{ env_var('HARDCHARGER_USERNAME') }}"
password: "{{ env_var('HARDCHARGER_PASSWORD') }}"
use_encryption: true
# database: analytics # optional existing default catalog
state_connection:
type: duckdb
database: sqlmesh_state.duckdb
default_gateway: hardcharger
model_defaults:
dialect: duckdb
Use the included CLI, which registers the adapter before SQLMesh loads YAML:
sqlmesh-hardcharger info
sqlmesh-hardcharger plan
sqlmesh-hardcharger run
It exposes SQLMesh's standard commands and options. For a local server without TLS, explicitly set use_encryption: false; otherwise HTTPS and certificate verification are enabled. The adapter builds hardcharger://host:port URIs, adding ?tls=false only for plaintext.
For the standard sqlmesh command, import sqlmesh_hardcharger in a Python config.py before constructing your SQLMesh Config. For Python applications:
import sqlmesh_hardcharger # registers type: hardcharger
from sqlmesh import Context
context = Context(paths="path/to/project")
try:
context.plan(auto_apply=True, no_prompts=True)
finally:
context.close()
Use a separate PostgreSQL state connection for production, following SQLMesh's state connection guidance. The local DuckDB state connection above is for development. The tests also exercise state migrations on Hardcharger, but SQLMesh does not recommend this custom engine for production state storage.
Features
- DuckDB SQL generation, SQLMesh plan/apply/run, incremental models, logical merges, SCD type 2 and table diffs.
- Arrow-native bulk DataFrame ingestion, including partial source columns, typed nulls and reordered columns.
- Native ADBC transactions and nested SQLMesh transaction scopes, with rollback on errors.
- Catalog discovery and switching, automatic schema creation, quoted identifiers and non-default catalogs.
- DuckLake with PostgreSQL metadata, partitioning and correct cascade behavior, inherited from current SQLMesh.
- Password, bearer token, browser OAuth/SSO, trusted external identity token and mutual TLS authentication through the native driver.
Connection options
| Option | Default | Meaning |
|---|---|---|
host |
localhost |
Server hostname or IPv6 address |
port |
31337 |
Warp SQL port (1–65535) |
username, password |
unset | Password sign-in |
access_token |
unset | Hardcharger bearer token; omit password credentials |
subject_token |
unset | Trusted identity-provider token for token exchange; omit other credentials |
auth_type |
unset (password) | password, external, client_certificate or mtls |
use_encryption |
true |
HTTPS; false explicitly opts into plain HTTP |
disable_certificate_verification |
false |
Development-only TLS verification bypass |
tls_root_certs |
unset | PEM CA text or file path |
tls_client_cert, tls_client_key |
unset | PEM text or paths for mTLS |
tls_server_name |
unset | Certificate hostname / SNI override |
database |
unset | Existing catalog to select on each new connection |
concurrent_tasks |
4 |
Concurrent SQLMesh tasks |
register_comments |
true |
Register model comments |
pre_ping |
false |
Check pooled connections before use |
For browser sign-in, set auth_type: external and omit username/password/token. For client-certificate sign-in, set auth_type: client_certificate, provide the certificate and key, and omit password/token credentials. See the driver authentication documentation.
Catalog creation attaches a DuckDB file on the server. Dropping a catalog detaches it; it never deletes a file on the client or deletes the server's database file. Manage server files through your server administration process. Materialized views, managed models, SQLMesh grant synchronization and custom when_matched logical merge clauses are not advertised by this adapter.
Development and testing
uv sync --extra dev --frozen
uv run ruff check .
uv run mypy sqlmesh_hardcharger
uv run pytest # unit tests
# All inherited and Hardcharger-specific integration tests, including DuckLake:
docker compose -p sqlmesh-hardcharger -f tests/integration/docker/compose.hardcharger.yaml up -d --wait
POSTGRES_HOST=127.0.0.1 POSTGRES_PORT=55441 uv run pytest -m integration
# Current upstream DuckDB and shared engine tests, over a real Hardcharger server:
uv run python scripts/test-upstream.py
The hardcharger development dependency downloads and verifies the released server binary on first use. Override it with HARDCHARGER_SERVER_BINARY when testing another build. A server is required for integration tests: they fail instead of silently skipping if it cannot start.
All 55 tests from sqlmesh-gizmosql are retained. The upstream runner pins SQLMesh v0.236.4 at f6527ffbd8d54d91e26fab7d36c8f4a061bc6451, uses the installed SQLMesh package, and replaces connection fixtures without changing assertions. Only the two MotherDuck-specific unit tests are deselected; the upstream suite's own unsupported-feature skips remain visible. Bump the pin and dependency range together when adopting a new SQLMesh API series.
CI tests Python 3.11–3.14, runs the upstream compatibility job, checks types and lint, builds the wheel/sdist, and publishes from version tags using PyPI Trusted Publishing with attestations. See release setup.
License and origin
Apache-2.0. Adapted from GizmoData's SQLMesh GizmoSQL adapter, preserving its Git history and tests. DuckDB engine semantics are inherited from Apache-2.0 SQLMesh. Hardcharger and GizmoData are trademarks of GizmoData.
Metadata
Release files for sqlmesh-hardcharger 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sqlmesh_hardcharger-1.0.1.tar.gz | 322.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sqlmesh_hardcharger-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 338.7 kB
Release files / sqlmesh_hardcharger-1.0.1.tar.gz
| Download URL | sqlmesh_hardcharger-1.0.1.tar.gz |
|---|---|
| Size | 322.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f83902855360eda503f20c50efd791fcf67d6ad4a67d2d667c65cc636da93664
|
|
BLAKE2b-256 checksum How to use checksums |
267cb572fa56a6c024e53e8773b961bc34b84323bb16eb755e9b881f483870ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / sqlmesh_hardcharger-1.0.1-py3-none-any.whl
| Download URL | sqlmesh_hardcharger-1.0.1-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aca80cc4129e5fda486b05186aece43e06bbf40101bb98bfc014ee7c1c0a19be
|
|
BLAKE2b-256 checksum How to use checksums |
5b62cd64216a26c99c5fc92286a4353d7331b93ebad9bcc91c265921df963079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for sqlmesh-hardcharger 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sqlmesh_hardcharger-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.