Skip to main content

SQLQuack
by SQLStack

Run warehouse SQL locally.

Translate warehouse SQL into DuckDB SQL for local testing and CI - without a running warehouse.
Website · Docs · Playground · Quickstart

SQLQuack checks SQL and converts queries to DuckDB SQL

Why SQLQuack?

SQL that runs on two engines doesn't always return the same answer. NULLs, decimal arithmetic and casts can behave differently.

SQLQuack checks its conversion rules against real results from the source warehouse. It handles those differences deliberately and gives you precise diagnostics when it can't convert a query - not plausible-looking SQL and crossed fingers.

  • Check early. Catch invalid SQL before it reaches the warehouse.
  • Test locally. Convert queries to DuckDB SQL for tests against small fixtures.
  • See what's blocking you. Scan a SQL project to find what converts and what needs attention.
  • Choose what to accept. Allow or refuse each known difference in sqlquack.toml.

Get started

pip install sqlquack

# Convert your first query
echo "SELECT 1 AS total" | sqlquack convert --no-config

# Check a SQL file
sqlquack check query.sql

# Convert a query using the tables in sources/*.yml
sqlquack convert query.sql

Or try the playground - no installation needed.

See the supported dialects and coverage, project guide and defaults for known differences for the details.

Use it from Python

import sqlquack

result = sqlquack.convert(
    sql="SELECT 1 AS total",
    options=sqlquack.ConvertOptions(no_config=True),
)

Python API

Running the suites

SQLQuack's parsers and conversion rules are checked against evidence recorded on the real engines. Rerunning it needs no account:

git clone https://github.com/sqlstack-io/sqlquack && cd sqlquack
uv sync
make check-syntax DIALECT=snowflake    # rerun the parser against recorded syntax evidence
make check-convert DIALECT=snowflake   # replay recorded translations on DuckDB
Command What it does
make pending DIALECT=snowflake What isn't recorded yet, in both suites
make check-syntax DIALECT=snowflake Rerun the parser against recorded evidence (offline)
make record-syntax DIALECT=duckdb Record evidence for new syntax cases
make check-convert DIALECT=snowflake [CASES=temporal] Replay recorded translations on DuckDB (offline)
make record-convert DIALECT=snowflake Record new translation cases on Snowflake
make verify-changed Replay only the cases whose conversion or recording changed since its last run
make check-merge The static checks and the Rust tests every change must pass
make test-crate CRATE=sqlquack-evidence One crate's tests
make python-api Build the Python module and run its API tests

A pull request runs what its changed files need. Documentation and website changes build and check the site. Other changes run make check-merge, the Python tests and the replay. The replay reuses main's judgement for every case whose conversion and recording are unchanged, and replays only the rest. A change under one of the full-replay paths in scripts/replay_scope/constants.py replays every case: the DuckDB pin, the lock files, the replay, comparison and policy crates, the error kinds, CI's toolchain and the evidence pin. A change outside every crate the sqlquack binary is built from replays nothing.

Recording needs the dialect's engine: DuckDB and SQLite record locally, while Snowflake, BigQuery and Databricks need a connection. Recording Snowflake syntax evidence isn't public yet. make help lists every target.


Built in Rust. Free and open source. Apache 2.0.

Part of SQLStack.

Metadata

Release files for sqlquack-cli 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlquack-cli 0.5.0
File Size Uploaded Provenance Actions
sqlquack_cli-0.5.0.tar.gz 2.4 MB With provenance Details for sqlquack_cli-0.5.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for sqlquack-cli 0.5.0
File Actions
sqlquack_cli-0.5.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for sqlquack_cli-0.5.0-py3-none-win_amd64.whl
sqlquack_cli-0.5.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for sqlquack_cli-0.5.0-py3-none-manylinux_2_28_x86_64.whl
sqlquack_cli-0.5.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for sqlquack_cli-0.5.0-py3-none-manylinux_2_28_aarch64.whl
sqlquack_cli-0.5.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for sqlquack_cli-0.5.0-py3-none-macosx_11_0_arm64.whl
sqlquack_cli-0.5.0-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details for sqlquack_cli-0.5.0-py3-none-macosx_10_15_x86_64.whl

Total release size: 139.7 MB

Release files / sqlquack_cli-0.5.0.tar.gz

Download URL sqlquack_cli-0.5.0.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
354152af8d61d6d7ed091753606fec8c5c58bf521b0e23098d0705c036d977a3
BLAKE2b-256 checksum
How to use checksums
16562757c2c626570837628737bb98638dee01cc74574605d6c13ad8465f8146
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 Nov 10, 2026.

Transparency log

Release files / sqlquack_cli-0.5.0-py3-none-win_amd64.whl

Download URL sqlquack_cli-0.5.0-py3-none-win_amd64.whl
Size 24.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
79318fbae809607947034da7b97c095cbec92453943b28a44189663ede17752e
BLAKE2b-256 checksum
How to use checksums
69736fbfad3333dfb3d2be93fd4384f5eac9bb10eb18b9c36f5af5f3bf72a76a
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 Nov 10, 2026.

Transparency log

Release files / sqlquack_cli-0.5.0-py3-none-manylinux_2_28_x86_64.whl

Download URL sqlquack_cli-0.5.0-py3-none-manylinux_2_28_x86_64.whl
Size 31.8 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
90c5e185e754d1b441d2f098719fedb0e8cb85bdc186fc937ccd9c86c273f690
BLAKE2b-256 checksum
How to use checksums
da6a693da85a4edcfae7061e21491d62f33259706178f2e605fba7059cc4d563
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 Nov 10, 2026.

Transparency log

Release files / sqlquack_cli-0.5.0-py3-none-manylinux_2_28_aarch64.whl

Download URL sqlquack_cli-0.5.0-py3-none-manylinux_2_28_aarch64.whl
Size 27.8 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
46c14a26b6d07aa253c70ea6d940a741870dad42e69270b2dcd2a6d5cec69c35
BLAKE2b-256 checksum
How to use checksums
dfcc8f87838011aee78d8658456f5a2b0d0ae61ae77ba17425586f3c02139981
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 Nov 10, 2026.

Transparency log

Release files / sqlquack_cli-0.5.0-py3-none-macosx_11_0_arm64.whl

Download URL sqlquack_cli-0.5.0-py3-none-macosx_11_0_arm64.whl
Size 25.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e7f35b334af59315f2448c5e2d90977b17877c99f2daf0a4cbf6bd5c8a9a7bce
BLAKE2b-256 checksum
How to use checksums
0d3ce4340b0b332d52d728a1d1f80d5729f0cb220a6a14b1c3b8e57b46ab649a
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 Nov 10, 2026.

Transparency log

Release files / sqlquack_cli-0.5.0-py3-none-macosx_10_15_x86_64.whl

Download URL sqlquack_cli-0.5.0-py3-none-macosx_10_15_x86_64.whl
Size 27.7 MB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
7897a822317e5e53939e8eec1a434403d7fa6d97c306e8deb0989dd94c38d39e
BLAKE2b-256 checksum
How to use checksums
b93874bb75de862dc7f142c864522278840a25cfc506f633e9fb040e05261550
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 Nov 10, 2026.

Transparency log

Security for sqlquack-cli 0.5.0

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for sqlquack_cli-0.5.0.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 Nov 10, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page