Contents

sqlglot 28.10.1

0

An easily customizable SQL parser and transpiler

sqlglot is a Python package that serves as a comprehensive SQL parser, transpiler, optimizer, and engine. It is designed to read a wide variety of SQL inputs and output syntactically and semantically correct SQL in the targeted dialects. The package can be used to format SQL or translate between 19 different dialects like DuckDB, Presto, Spark, Snowflake, and BigQuery. It falls under the category of Database Management Systems (DBMS).

Stars: 8931, Watchers: 8931, Forks: 1065, Open Issues: 4

The tobymao/sqlglot repo was created 4 years ago and the last code push was 7 minutes ago.
The project is extremely popular with a mindblowing 8931 github stars!

How to Install sqlglot

You can install sqlglot using pip

pip install sqlglot

or add it to a project with poetry

poetry add sqlglot

Package Details

Author
None
License
None
Homepage
None
PyPi:
https://pypi.org/project/sqlglot/
Documentation:
https://sqlglot.com/sqlglot.html
GitHub Repo:
https://github.com/tobymao/sqlglot

Classifiers

No  sqlglot  pypi packages just yet.

Errors

A list of common sqlglot errors.

Code Examples

Here are some sqlglot code examples and snippets.

GitHub Issues

The sqlglot package has 4 open issues on GitHub

  • feat(optimizer)!: Annotate SIN, COS, TAN, COT for T-SQL
  • Snowflake dialect: support for DIRECTED joins (e.g. RIGHT DIRECTED JOIN)
  • feat(snowflake)!: fix input rounding issue when transpiling boolean logic functions from Snowflake to DuckDB
  • feat(duckdb): Add transpilation support for FLATTEN (ARRAY_FLATTEN)
  • Feat(optimizer): UDF annotation
  • Feat(starrocks)!: improve some starrocks properties generation
  • feat(starrocks): add full support for partitions

See more issues on GitHub

Related Packages & Articles

mage-ai 0.9.79

Mage is a tool for building and deploying data pipelines.