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.

SQLQuack's parser started as a fork of Polyglot, a Rust SQL transpiler inspired by SQLGlot. The translation to DuckDB, the typing and the recorded evidence behind them are SQLQuack's own.

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

Credits

SQLQuack wouldn't exist without two projects:

  • Polyglot by Tobias (@tobilg). SQLQuack's tokenizer, parser and syntax tree are a modified fork of Polyglot's, and much of that code is still his. Tobias also fixed many issues I reported while building SQLBuild on Polyglot.
  • SQLGlot by Toby Mao and contributors, for years of work on SQL transpilation that this space builds on.

Both are MIT licensed. Their licence texts are in THIRD_PARTY_NOTICES and ship with every release.

SQLQuack goes a different way from both on translation. It doesn't rewrite the tree and print it out. It checks each rule against recorded warehouse results and refuses what it can't prove.


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

Part of SQLStack.

Metadata

Release files for sqlquack-cli 0.11.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.11.0
File Size Uploaded Provenance Actions
sqlquack_cli-0.11.0.tar.gz 2.6 MB With provenance Details for sqlquack_cli-0.11.0.tar.gz

Built distributions (wheels)

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

Total release size: 144.6 MB

Release files / sqlquack_cli-0.11.0.tar.gz

Download URL sqlquack_cli-0.11.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
318672099ebeddd64a3f28021859959a259f1635f2db345eb32e62ba0f5d94f6
BLAKE2b-256 checksum
How to use checksums
1cfd2a05550ae9cf19975d08bee167d56c3526485ad8f29e938164e4a1984d1e
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 12, 2026.

Transparency log

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

Download URL sqlquack_cli-0.11.0-py3-none-win_amd64.whl
Size 25.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e6dacd1b781e3f7301a2cf5efe3e34244a1a888e8ebd48240f7708bfda45dee2
BLAKE2b-256 checksum
How to use checksums
baf91cb04f55d3a59eae29bde3956a740b924c183ab2574288f01eaf7bf6723c
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 12, 2026.

Transparency log

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

Download URL sqlquack_cli-0.11.0-py3-none-manylinux_2_28_x86_64.whl
Size 32.7 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c0d9318eeb16194bb037001ca6a8118ff27fe4948d8c838f96a953800fb639ea
BLAKE2b-256 checksum
How to use checksums
bac7e650e3688c0433b39138ed00a9dcca8166d085ed0ae60de7dd81b87b9e09
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 12, 2026.

Transparency log

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

Download URL sqlquack_cli-0.11.0-py3-none-manylinux_2_28_aarch64.whl
Size 28.7 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
49e9cd95d300eaf9952038fa3c7e4d94cc9a91528857c7dc3dfdc0b49186c7ef
BLAKE2b-256 checksum
How to use checksums
6838efe1755112f7562e893f67383364c8b67e0d8a71c522f5b1f6fb1103d3ca
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 12, 2026.

Transparency log

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

Download URL sqlquack_cli-0.11.0-py3-none-macosx_11_0_arm64.whl
Size 26.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
36dc3d9bef66fd29ffbc34812bab974c00ae050b8106341ebc99f619cc2d26d1
BLAKE2b-256 checksum
How to use checksums
a76df40726595bbb0a2c5852939a7a815532b7538c1f25205247452bd4981f94
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 12, 2026.

Transparency log

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

Download URL sqlquack_cli-0.11.0-py3-none-macosx_10_15_x86_64.whl
Size 28.6 MB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
5d1f0f5b5ca71198afce4dbf7d57e964c5c8f9d8c3739f4c9ed1e1ac6d5dbbff
BLAKE2b-256 checksum
How to use checksums
a73cfb04df0cc1aa1f69ee5ba10b9c4449a14a306e703fb2bddeef57eec0b41a
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 12, 2026.

Transparency log

Security for sqlquack-cli 0.11.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.11.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 12, 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.

Release history Release notifications | RSS feed

This release

0.11.0 This release

6 release files Full provenance

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