polyglotSQL: SQL Parsing, Analysis and Dialect Translation

Parse, tokenize, validate, format, analyze and translate SQL between more than 30 dialects ('PostgreSQL', 'MySQL', 'BigQuery', 'Snowflake', 'DuckDB', 'T-SQL', and others) using the 'polyglot-sql' Rust crate <https://github.com/tobilg/polyglot>, a Rust port of the 'SQLGlot' 'Python' library. All processing happens locally in the R session; no database connection, 'Python' runtime or external service is required. Includes column-level lineage, structural query analysis, query optimization, 'AST' diffing and 'OpenLineage' facet generation.

Version: 0.1.0
Depends: R (≥ 4.2)
Imports: cli, jsonlite
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
Published: 2026-08-04
DOI: 10.32614/CRAN.package.polyglotSQL (may not be active yet)
Author: Andre Leite ORCID iD [aut, cre], Marcos Wasiliew [aut], Hugo Vasconcelos ORCID iD [aut], Carlos Amorim ORCID iD [aut], Diogo Bezerra ORCID iD [aut], Tobias Müller [cph] (Author of the bundled 'polyglot-sql' Rust crate (Polyglot project)), Toby Mao [cph] (Author of SQLGlot, from which Polyglot is derived), The authors of the vendored Rust dependencies [cph] (see inst/COPYRIGHTS)
polyglotSQL author details
Maintainer: Andre Leite <leite at castlab.org>
BugReports: https://github.com/StrategicProjects/polyglot-sql-r/issues
License: MIT + file LICENSE
Copyright: see file COPYRIGHTS
URL: https://github.com/StrategicProjects/polyglot-sql-r, https://strategicprojects.github.io/polyglot-sql-r/
NeedsCompilation: yes
SystemRequirements: Cargo (Rust's package manager), rustc >= 1.88.0, xz
Language: en-US
Materials: README, NEWS
CRAN checks: polyglotSQL results

Documentation:

Reference manual: polyglotSQL.html , polyglotSQL.pdf
Vignettes: Migrating SQL between dialects (source, R code)
Getting started with polyglotSQL (source, R code)
Installation and troubleshooting (source, R code)
Parsing, validation and lineage (source, R code)

Downloads:

Package source: polyglotSQL_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: polyglotSQL_0.1.0.zip, r-oldrel: not available
macOS binaries: r-release (arm64): polyglotSQL_0.1.0.tgz, r-oldrel (arm64): polyglotSQL_0.1.0.tgz, r-release (x86_64): not available, r-oldrel (x86_64): not available

Linking:

Please use the canonical form https://CRAN.R-project.org/package=polyglotSQL to link to this page.