polyglotSQL: SQL Parsing, Analysis and Dialect Translation
Source:R/polyglotSQL-package.R
polyglotSQL-package.RdParse, 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.
Acknowledgements
polyglotSQL embeds the polyglot-sql
Rust crate by Tobias Müller (MIT), which is a Rust port of
SQLGlot by Toby Mao (MIT). See
inst/COPYRIGHTS for the licenses of all vendored Rust dependencies.
Author
Maintainer: Andre Leite leite@castlab.org (ORCID)
Authors:
Andre Leite leite@castlab.org (ORCID)
Marcos Wasiliew marcos.wasilew@gmail.com
Hugo Vasconcelos hugo.vasconcelos@ufpe.br (ORCID)
Carlos Amorim carlos.agaf@ufpe.br (ORCID)
Diogo Bezerra diogo.bezerra@ufpe.br (ORCID)
Other contributors:
Tobias Müller github@tobilg.com (Author of the bundled 'polyglot-sql' Rust crate (Polyglot project)) [copyright holder]
Toby Mao (Author of SQLGlot, from which Polyglot is derived) [copyright holder]
The authors of the vendored Rust dependencies (see inst/COPYRIGHTS) [copyright holder]