Skip to main content

Datoria SQL Compiler

A single grammar definition that generates parsers, renderers, and semantic analyzers for 15 SQL dialects -- producing high-performance, lossless, fully-typed tooling from one source of truth.

At a Glance

Dialects15 -- ANSI, PostgreSQL, BigQuery, Snowflake, DuckDB, Spark, Databricks, T-SQL, Oracle, DB2, MariaDB, Presto, Trino, Redshift, SQLite
Identity tests170,686+ roundtrip tests from 33+ real-world SQL sources, 99.7%+ pass rate
AST types14,782 distinct typed interfaces across all dialects
Parse speed44 microseconds/file
Semantic analysisMulti-pass optimizer, column lineage, type inference, scope resolution
dbt supportFull Jinja compilation, tested against 59 public dbt projects (9,925 models)
FormatterAST-aware, adaptive, configurable, dialect-specific defaults
TargetGenerated Java (JVM); architecture supports Rust, TypeScript, Go targets

What Makes This Different

One grammar, many dialects. A single declarative grammar definition generates specialized, optimized parsers for each dialect. No hand-written parsers, no runtime grammar interpretation, no per-dialect maintenance burden. Add a dialect feature once and it works everywhere the grammar says it should.

Lossless by design. Every token is preserved -- whitespace, comments, keyword spelling, parenthesization. Parse a file, render it back, and you get byte-identical output. This makes it safe for refactoring tools, formatters, and migration scripts that need to touch SQL without breaking it.

Full semantic stack. Parsing is just the foundation. The compiler includes scope resolution, column qualification, type inference, column lineage, query optimization, and SQL formatting -- all operating on the same typed, immutable AST.

Generated, not interpreted. Each dialect's parser compiles to specialized Java code. The JIT compiler can inline, optimize, and devirtualize it like any hand-written code -- which is why it outperforms parsers written in Rust and C.

Try It

Each dialect has an interactive playground with live parsing, formatting, optimization, column lineage, and type inference. Pick your dialect and paste your SQL:

ANSI SQL | PostgreSQL | BigQuery | Snowflake | DuckDB | Spark | Databricks | T-SQL | Oracle | DB2 | MariaDB | Presto | Trino | Redshift | SQLite

Capabilities

CapabilityDescription
Dialect Support15 SQL dialects from a single shared grammar definition
Typed AST & Roundtripping14,782 typed interfaces, immutable records, lossless roundtripping, semantic comparison
dbt & JinjaFull Jinja template compilation with dbt project support
SQL FormattingAdaptive, AST-aware formatter with configurable defaults
Column LineageTrace every output column back to base table sources
Type InferenceNullable-aware typing for every expression
Query OptimizationMulti-pass rule-based optimizer with predicate pushdown and subquery elimination
Error RecoveryParse broken SQL into partial ASTs with zero overhead on valid input
PerformanceFastest full-featured SQL parser benchmarked
Built for LLMsTight feedback loops for code agents and SQL generation
Why DatoriaHow we compare to SQLGlot, Calcite, jOOQ, and SDF

Strategic Context

The SQL tooling landscape consolidated dramatically in 2025. Fivetran acquired SQLGlot (via Tobiko Data), dbt Labs acquired SDF Labs, and the subsequent Fivetran-dbt merger means a single entity now controls the dominant SQL infrastructure used across the data ecosystem -- SQLGlot, SDF/Fusion, and SQLMesh.

For companies building SQL-powered products -- data governance, migration tools, observability platforms, IDE plugins -- this creates a strategic dependency on a competitor. Datoria is the only independent, production-grade SQL compiler covering this breadth of dialects with this depth of semantic analysis.

See Why Datoria for a detailed comparison with SQLGlot, Calcite, jOOQ, and SDF.

Evaluate or License

Datoria is a commercial SQL compiler available for technical evaluation and licensing. The interactive playgrounds on this site let you test parsing, formatting, lineage, and optimization against your own SQL across all 15 dialects.

Request a technical evaluation. Test the compiler against your production SQL corpus -- your dialects, your queries, your edge cases. Free 30-day evaluations available.

OEM licensing. Embed the full stack in your product with redistribution rights. Per-dialect or all-dialect bundles. Category-exclusive terms available.

Contact us at hello@datoria.ai for details.