polyglot
Polyglot is a Rust-based SQL transpiler that converts queries between 32+ database dialects (MySQL, PostgreSQL, Snowflake, BigQuery, etc.). It ships as a Rust crate, TypeScript/WASM SDK, Python package, and Go module, enabling cross-dialect SQL transformation, parsing, formatting, and lineage analysis.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | tobilg/polyglot |
| Owner | tobilg |
| Primary language | Rust |
| License | MIT — OSI-approved |
| Stars | 870 |
| Forks | 55 |
| Open issues | 3 |
| Latest release | v0.5.14 (2026-07-07) |
| Last updated | 2026-07-07 |
| Source | https://github.com/tobilg/polyglot |
What polyglot is
Built in Rust with WASM compilation support, Polyglot provides a fully-typed AST parser, query transpiler, and code generator for 32 SQL dialects. Core features include fluent builder APIs, schema-aware validation, column lineage tracking (OpenLineage-compatible), and guard-rail limits (16 MiB input, 1M tokens/AST nodes) to prevent pathological input exhaustion. Stack-safety hardening via stacker on native builds.
Get the polyglot source
Clone the repository and explore it locally.
git clone https://github.com/tobilg/polyglot.gitcd polyglot# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Language bindings: Rust crate is primary; TypeScript/WASM, Python (PyO3), and Go (C FFI) are available. Choose based on your runtime (Node.js → WASM, backend Python → PyO3, Go services → FFI wrapper).
- WASM bundle size and latency: WASM SDK is browser-ready but introduces compilation overhead. Test performance in your target environment; native Rust or Python bindings may be faster for server-side.
- Go FFI runtime dependency: Go bindings require separate polyglot-sql-ffi shared library (`.so`/`.dylib`/`.dll`). No auto-download; manual build or path configuration required.
- Guard limits are non-configurable in WASM by default (16 MiB input, 1M tokens/AST). Rust, Python, and C FFI expose overrides. Plan tokenization budgets for large queries.
- No stack overflow protection in WASM (stacker disabled). Deeply nested SQL (>10k nesting levels) may exhaust WASM memory; use guard limits or pre-validate input.
When to avoid it — and what to weigh
- You need production-grade execution or optimization — Polyglot transpiles and analyzes SQL; it does not execute queries or perform query optimization. For that, use query engines (DuckDB, Presto) or native database engines.
- You require mature, battle-tested stability in critical systems — Project is ~6 months old (created Jan 2026, latest release Jul 2026). While actively maintained, it lacks long production track record. Enterprise adoption risk requires thorough vetting.
- You depend on exhaustive dialect coverage or obscure SQL features — Although 32 dialects are supported, edge cases and vendor-specific extensions may not be fully handled. Verify your exact SQL patterns against the playground before committing.
- You need commercial support, SLAs, or vendor backing — Single-author OSS project (tobilg). No commercial entity, support contracts, or liability guarantees. Community-driven maintenance only.
License & commercial use
MIT License (permissive OSI-approved). Allows commercial use, modification, and distribution with minimal restrictions (require attribution and preserve license notice). No copyleft obligations.
MIT license permits commercial use without requiring source disclosure or reciprocal licensing. However, no warranty, indemnification, or commercial support is provided. Suitable for internal tools and products; review your risk tolerance for critical paths given single-author maintenance and lack of vendor backing.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Guard limits (input size, token budget, AST depth, set-operation chains) mitigate pathological input DoS on format/parse. Stack-safety hardening (stacker) reduces stack overflow risk on native builds. WASM lacks stacker protection. No disclosed security audit, exploit policy, or dependency scanning. Validate untrusted SQL before processing. No cryptographic features; suitable for query transformation only.
Alternatives to consider
sqlglot (Python; Apache 2.0)
Mature SQL transpiler with 20+ dialects, broader ecosystem integration, commercial backing (Databricks-adjacent), and stronger community. Reference for Polyglot design but more established for production use.
prql (Rust; MIT)
Functional SQL query language with Rust foundation and WASM support. Different paradigm (transpile to SQL) vs. dialect-to-dialect. Good for new query construction; less suited for legacy SQL migration.
Native database query rewrite engines (DuckDB Optimizer, Trino Parser)
If you need execution alongside transpilation, DuckDB and Trino include SQL parsing/rewriting. Heavier dependencies but integrated with execution. Better for end-to-end query processing.
Build on polyglot with DEV.co software developers
Evaluate Polyglot on the online playground, then integrate the Rust, Python, TypeScript, or Go SDK into your data platform. Start with syntax transpilation; add lineage and validation as needed.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
polyglot FAQ
Can Polyglot execute SQL queries?
Is lineage tracking available without a schema?
Can I use Polyglot in the browser?
What if my SQL dialect is not in the 32 supported?
Work with a software development agency
From first prototype to production, DEV.co delivers software development services around tools like polyglot. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source databases and beyond.
Ready to standardize cross-dialect SQL?
Evaluate Polyglot on the online playground, then integrate the Rust, Python, TypeScript, or Go SDK into your data platform. Start with syntax transpilation; add lineage and validation as needed.