--- id: sqlglot version: "30.17.0" license: MIT license_treatment: permissive maintenance: active --- # sqlglot — An easily customizable SQL parser and transpiler License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install sqlglot uv add sqlglot poetry add sqlglot ## Description ![SQLGlot logo](sqlglot.png) SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used to format SQL or translate between [over 30 dialects](https://github.com/tobymao/sqlglot/blob/main/sqlglot/dialects/__init__.py) like [DuckDB](https://duckdb.org/), [Presto](https://prestodb.io/) / [Trino](https://trino.io/), [Spark](https://spark.apache.org/) / [Databricks](https://www.databricks.com/), [Snowflake](https://www.snowflake.com/en/), and [BigQuery](https://cloud.google.com/bigquery/). It aims to read a wide variety of SQL inputs and output syntactically and semantically correct SQL in the targeted dialects. It is a very comprehensive generic SQL parser with a robust [test suite](https://github.com/tobymao/sqlglot/blob/main/tests/). It is also quite [performant](#benchmarks), while being written purely in Python. You can easily [customize](#custom-dialects) the parser, [analyze](#metadata) queries, traverse expression trees, and programmatically [build](#build-and-modify-sql) SQL. SQLGlot can detect a variety of [syntax errors](#parser-errors), such as unbalanced parentheses, incorrect usage of reserved keywords, and so on. These errors are... ## AI interpretation — verify before relying SQLGlot is a no-dependency SQL parser, transpiler, and optimizer that translates SQL between over 30 dialects including DuckDB, Presto, Spark, Snowflake, and BigQuery while supporting query analysis, AST traversal, and programmatic SQL construction. Verdict: SQLGlot is a production-ready, actively maintained SQL transpiler with zero dependencies, permissive licensing, and no known vulnerabilities. Its broad dialect support and comprehensive feature set make it suitable for SQL tooling, data pipeline work, and query analysis across heterogeneous systems. [View on SkillFed](https://skillfed.io/packages/sqlglot) · [View on PyPI](https://pypi.org/project/sqlglot/)