awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
tobymao avatar

tobymao/sqlglot

0
View on GitHub↗
9,336 stars·1,176 forks·Python·MIT·6 vuessqlglot.com↗

Sqlglot

sqlglot is a SQL parser and transpiler that represents queries as abstract syntax trees to enable structural analysis, modification, and semantic transformation. It functions as a dialect translator and query optimizer, converting SQL code between different database engines and simplifying syntax trees through rule-based normalization.

The project provides a framework for defining custom SQL dialects by overriding tokenizers, parsers, and generators. It includes a lineage analyzer to track data flow from source tables through complex queries to identify the origin of specific columns.

Additional capabilities cover programmatic SQL generation, syntax validation, and schema-aware type inference. The system can generate logical plans for query planning, extract metadata, and execute queries in-memory using Python dictionaries as data sources.

Features

  • SQL Abstract Syntax Tree Parsing - Parses raw SQL strings into structured abstract syntax trees that capture the semantics of the statement.
  • SQL Dialect Adapters - Translates SQL queries between different database dialects by mapping functions, types, and delimiters.
  • SQL Lineage Analyzers - Compiles complex SQL statements to trace column-level data lineage and dependencies.
  • Column-Level Lineage Extraction - Tracks the flow of data from source tables through transformations to identify column origins.
  • Recursive Descent Parsers - Uses a recursive descent parsing engine to translate SQL text into structured syntax trees.
  • Lexical Tokenizers - Implements specialized lexers to handle unique keywords and delimiters for various database engines.
  • Query Optimizers - Provides automated query optimization by rewriting boolean logic and normalizing predicates to improve execution speed.
  • Dynamic SQL Generators - Provides a Python API for programmatically building and modifying dynamic SQL queries.
  • SQL Syntax Tree Construction - Provides a programmatic way to build or modify SQL queries by manipulating the abstract syntax tree.
  • AST-Based Query Construction - Constructs SQL statements programmatically by manipulating a structured syntax tree via a builder pattern.
  • Dialect Specification Frameworks - Provides a framework for creating new SQL engine specifications by overriding core parsing and generation components.
  • SQL Generators - Converts a syntax tree back into a SQL string with support for custom formatting and dialect rules.
  • SQL Parsers - Parses and transpiles SQL code between different database dialects using structured expression trees.
  • AST Transformation Tools - Enables structural modification of SQL queries by searching for and transforming specific nodes within the syntax tree.
  • Intermediate Representations - Uses a generic internal representation to translate SQL between different database dialects.
  • Semantic Analysis - Resolves semantic context and relationships, such as references within common table expressions.
  • Query Planning - Converts optimized syntax trees into directed acyclic graphs of execution steps for query planning.
  • Schema Modelers - Represents the structure of tables, views, and columns to enrich the analysis of syntax trees.
  • Syntax Validation - Parses SQL strings to identify syntax violations and return structured error messages with precise locations.
  • SQL Metadata Extraction - Extracts structural information from queries by identifying the specific columns and tables being referenced.
  • SQL Formatters - Generates consistently styled SQL from a syntax tree with options for pretty printing and indentation.
  • SQL Query Optimizations - Simplifies the syntax tree by rewriting boolean predicates and normalizing expressions through a set of predefined transformation rules.
  • Visitor Pattern Traversers - Implements the visitor pattern to identify and modify specific nodes within SQL expression trees.
  • Language Support Extensions - Enables the addition of new database system support through subclassing and plugin registration.
  • Expression Transformers - Provides utilities for modifying query logic by traversing and mapping specific node types within the syntax tree.
  • Query Result Type Inference - Assigns data types to expression nodes by referencing schema information and function signature metadata.
  • Schema-Driven Type Inference - Infers data types for expression nodes using external table definitions and function metadata.
  • Database Tools - No-dependency SQL parser, transpiler, and optimizer.
  • SQL Development Tools - Transpiler for translating between multiple SQL dialects.
  • SQL Parsers - Pure Python SQL parser, transpiler, and builder.

Historique des stars

Graphique de l'historique des stars pour tobymao/sqlglotGraphique de l'historique des stars pour tobymao/sqlglot

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Questions fréquentes

Que fait tobymao/sqlglot ?

sqlglot is a SQL parser and transpiler that represents queries as abstract syntax trees to enable structural analysis, modification, and semantic transformation. It functions as a dialect translator and query optimizer, converting SQL code between different database engines and simplifying syntax trees through rule-based normalization.

Quelles sont les fonctionnalités principales de tobymao/sqlglot ?

Les fonctionnalités principales de tobymao/sqlglot sont : SQL Abstract Syntax Tree Parsing, SQL Dialect Adapters, SQL Lineage Analyzers, Column-Level Lineage Extraction, Recursive Descent Parsers, Lexical Tokenizers, Query Optimizers, Dynamic SQL Generators.

Quelles sont les alternatives open-source à tobymao/sqlglot ?

Les alternatives open-source à tobymao/sqlglot incluent : jooq/jooq — jOOQ is a type-safe SQL query builder for Java that generates code from live database schemas, enabling compile-time… masterminds/squirrel — Squirrel is a Go database library and SQL query builder that provides a programmatic interface for constructing and… dbt-labs/dbt-core — dbt-core is a command-line framework for transforming data within a warehouse using modular SQL and version control.… xiaomi/soar — Soar is a suite of specialized tools designed for analyzing MySQL performance, advising on indexing, and optimizing… sqlfluff/sqlfluff — SQLFluff is a multi-dialect SQL linter, formatter, and style guide enforcer. It functions as a parser and analyzer… seaql/sea-orm — Sea-ORM is an asynchronous SQL object-relational mapper and database toolkit for mapping relational tables to strongly…

Alternatives open source à Sqlglot

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Sqlglot.
  • jooq/jooqAvatar de jOOQ

    jOOQ/jOOQ

    6,666Voir sur GitHub↗

    jOOQ is a type-safe SQL query builder for Java that generates code from live database schemas, enabling compile-time validation of SQL syntax and data types. Its core identity is built around a fluent DSL that mirrors SQL structure, a code generator that maps tables, views, and routines to Java objects, and a multi-dialect engine that translates the same DSL into vendor-specific SQL for over 30 databases. The project also includes a SQL parser and transformer for refactoring or dialect conversion, reactive stream integration for non-blocking query execution, and a JDBC proxy diagnostics tool f

    Javacode-generatordatabasedb2
    Voir sur GitHub↗6,666
  • masterminds/squirrelAvatar de Masterminds

    Masterminds/squirrel

    7,949Voir sur GitHub↗

    Squirrel is a Go database library and SQL query builder that provides a programmatic interface for constructing and executing SQL statements. It enables the creation of queries using a fluent interface to avoid manual string concatenation. The library functions as a SQL dialect generator, producing queries formatted for specific database engines by adjusting placeholders and syntax to match target requirements. This allows for the generation of SQL compatible with multiple different database environments. Beyond query construction, the project covers the execution of generated statements aga

    Go
    Voir sur GitHub↗7,949
  • dbt-labs/dbt-coreAvatar de dbt-labs

    dbt-labs/dbt-core

    13,051Voir sur GitHub↗

    dbt-core is a command-line framework for transforming data within a warehouse using modular SQL and version control. It functions as a data transformation engine that enables users to define data structures and business logic through declarative configuration files, which the system then compiles into executable code. By managing complex data dependencies through a directed acyclic graph, it ensures that transformation tasks execute in the correct order while maintaining a manifest-driven state to track lineage and execution history. The project distinguishes itself through an adapter-based d

    Rustanalyticsbusiness-intelligencedata-modeling
    Voir sur GitHub↗13,051
  • xiaomi/soarAvatar de XiaoMi

    XiaoMi/soar

    8,770Voir sur GitHub↗

    Soar is a suite of specialized tools designed for analyzing MySQL performance, advising on indexing, and optimizing SQL syntax. It functions as a performance analyzer, index advisor, and query optimizer to identify bottlenecks and suggest structural improvements for faster execution. The project distinguishes itself through a system for rewriting SQL statements into optimized equivalent versions using custom heuristic rules and patterns. It also features a dedicated index advisor that evaluates query patterns and database metadata to recommend the creation of new indexes. Its broader capabil

    Goadvisorauditorcommand-line
    Voir sur GitHub↗8,770
Voir les 30 alternatives à Sqlglot→