acryl-sqlglot
An easily customizable SQL parser and transpiler
Decision gist · record as of 2026-08-14
Yes. acryl-sqlglot is a mature, actively maintained tool with zero runtime dependencies, permissive licensing, and no known vulnerabilities. It solves a concrete problem—cross-dialect SQL translation—that is difficult to do correctly by hand. Install it if you need to work with SQL across multiple database systems or parse and analyze SQL programmatically.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is frictionless—the package has zero runtime dependencies and ships as a pure Python wheel.
- The project is actively maintained with recent commits and a large repository presence.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
last release 2024-10-16 (667 days) · last repo commit 2026-08-14 · 9,529 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 95,328 downloads/mo, #13,270 on PyPI
Alternatives
Verify before relying
pip install acryl-sqlglot
import sqlglot
sqlglot.transpile("SELECT EPOCH_MS(1618088028295)", read="duckdb", write="hive")[0]- Whether the optional Rust tokenizer (via acryl-sqlglot[rs]) provides meaningful performance gains for typical workloads.
- Specific SQL validation limitations beyond what the description states about not being a validator.
- Performance characteristics and benchmarks for large-scale query parsing and transpilation.
What it is and what it does
acryl-sqlglot is a pure-Python SQL parser and transpiler that reads SQL in one dialect and outputs it in another. It supports 23 different SQL dialects including DuckDB, Presto, Trino, Spark, Databricks, Snowflake, and BigQuery. The package can format SQL, translate between dialects, optimize queries, analyze metadata (find columns and tables), build SQL programmatically, and traverse abstract syntax trees. It includes a comprehensive test suite and is performant despite being written entirely in Python.
The parser is designed to be forgiving rather than strict—it aims to read a wide variety of SQL inputs and output syntactically and semantically correct SQL in the target dialect, but does not aim to be a SQL validator and may not detect certain syntax errors. You can customize the parser, configure how it handles dialect incompatibilities (warn or raise), and inspect or modify parsed query trees. It preserves comments on a best-effort basis and handles identifier delimiters and data type translation across dialects.
Use it for
- Translate SQL queries between database systems (e.g., convert Spark SQL to DuckDB or Snowflake syntax).
- Format and normalize SQL code across a codebase with consistent dialect rules and identifier handling.
- Extract metadata from queries—find all columns, tables, or projections referenced in a SELECT statement.
- Build or modify SQL queries programmatically by constructing and manipulating expression trees.
- Optimize SQL queries using the built-in optimizer before execution or deployment.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
acryl-sqlglot is a mature, actively maintained tool with zero runtime dependencies, permissive licensing, and no known vulnerabilities. It solves a concrete problem—cross-dialect SQL translation—that is difficult to do correctly by hand. Install it if you need to work with SQL across multiple database systems or parse and analyze SQL programmatically.
Install
acryl-sqlglot on PyPI
Before you install
Installation is frictionless—the package has zero runtime dependencies and ships as a pure Python wheel. The project is actively maintained with recent commits and a large repository presence.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
Quickstart
pip install acryl-sqlglot
import sqlglot
sqlglot.transpile("SELECT EPOCH_MS(1618088028295)", read="duckdb", write="hive")[0]
Verify before relying
- Whether the optional Rust tokenizer (via acryl-sqlglot[rs]) provides meaningful performance gains for typical workloads.
- Specific SQL validation limitations beyond what the description states about not being a validator.
- Performance characteristics and benchmarks for large-scale query parsing and transpilation.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 667 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 95,328 / month, #13,270 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: SQL |
Evidence: acryl_sqlglot-25.25.2.dev9-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sql dialect converter”
- acryl-sqlglotParses, transpiles, and optimizes SQL across 23 different dialects…
- databricks-labs-remorphConverts SQL code between different database dialects and reconciles…
- fugue-sql-antlrParses Fugue SQL dialect into an abstract syntax tree using ANTLR4,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also sqlglot · sqlglotrs · sql-metadata · sqlglotc · collate-sqlfluff · fugue-sql-antlr · collate-sqllineage · sqlfluff · sqlfluff-templater-dbt · simple-ddl-parser