Skip to contents

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.

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:

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]