mrkeyoor.com_
Sat 03 Oct 15:33 UTC
Dev Toolsevaluationupdated 03 Oct 2026

sqlfluff review

SQLFluff checks SQL for style and structural problems, then can rewrite many of the findings automatically. It understands 28 listed SQL dialects plus Jinja, placeholders, Python format strings, dbt, and a new SQLMesh plugin, which makes one rule set practical across mixed analytics projects.

Verdict

Our SQLFluff run built in 8 seconds, but the test suite was only at 54% when our 900-second cap expired, so adoption is easier than contribution on a modest CI box. Use it for broad dialect and template coverage, with linting enabled widely and automatic fixes reviewed in pull requests. Choose a narrower formatter when whitespace is the only policy you need.

We ran it

Lab card: what happened when we ran sqlfluffScreenshot of sqlfluff (www.sqlfluff.com)
Install✓ · 80s84 packages · 165 MB
Build✓ · 8s
Tests✗ timed out · 900sran, no count parsed
Known vulns0(pip-audit)
Repo6087 files~220,773 lines of source · 26.1 MB · 15 CI workflows · Dockerfile · tests dir

Answers from our run

Does sqlfluff build from source?

Dependencies installed in 80 seconds (84 packages), and the build succeeded in 8 seconds. We cloned commit d5ae64c into a clean Debian container with 3 CPUs and no project-specific setup.

Do sqlfluff's tests pass?

We could not finish them: the suite was still running after 15 minutes in our container.

Does sqlfluff have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use sqlfluff?

Teams that need a quick full contributor suite on modest CI hardware: our run reached 54% before the 900-second test cap.

What are the alternatives to sqlfluff?

sqruff, SQL Formatter, pgFormatter. Our SQLFluff run built in 8 seconds, but the test suite was only at 54% when our 900-second cap expired, so adoption is easier than contribution on a modest CI box.

Setup3/580-second install, while the full suite exceeded 900 seconds
Docs5/5Dialects, templaters, rules, CLI, Docker, and migrations are covered
Community5/59,914 stars, an October 3 push, and a release one day earlier
Maturity4/5v4.4.0 is established, but unsafe fix reports still need care

Who it’s for

Data teams standardizing SQL across several warehouses or query engines.
dbt, Jinja, or SQLMesh projects that need linting after templates render.
Platform teams sending SQL findings into GitHub, GitLab, or SARIF-aware CI.
Maintainers willing to review every automatic fix as a code change.

Who it’s NOT for

Teams that need a quick full contributor suite on modest CI hardware: our run reached 54% before the 900-second test cap.
Projects that apply automatic fixes straight to production SQL: issue 8626 shows RF03 turning a correlated T-SQL predicate into an always-true comparison.
Jinja-heavy repositories that cannot inspect diffs: issue 8611 reports source text deletion when a token spans a template tag.
Users expecting complete grammar coverage for every listed dialect: the README says support may be incomplete, and active issues document current syntax gaps.
Applications depending on a stable Python API: the release policy says that API may change more often than the command-line interface.

Setup reality

Our sandbox installed commit d5ae64c in 80 seconds, adding 84 packages and using 165 MB. The build passed in 8 seconds. Tests timed out at 900 seconds with progress at 54%; the final log showed continuing passed-test dots and no failure traceback. Pip-audit found 0 known vulnerabilities.

Basic use needs Python and a chosen dialect. dbt and SQLMesh templating use plugins. The optional Rust parser installs from a wheel on supported CPython 3.10+ platforms; other platforms need Rust plus a working C or C++ build setup.

The checkout had 6,087 files, about 220,773 source lines, and used 26.1 MB. It included 15 CI workflows, a Dockerfile, a compose file, and a tests directory. The full development suite needs a CI budget longer than our 15-minute cap.

Its 28 dialects turn style into shared infrastructure

SQLFluff's current README lists 28 dialects, ranging from ANSI and PostgreSQL to Snowflake, BigQuery, Databricks, and T-SQL. It parses SQL before applying configurable rules, which lets it reason about aliases, joins, layout, and structure instead of treating a query as plain text. Jinja, placeholders, Python format strings, and dbt cover the template systems common in analytics repositories.

Release 4.4.0 added an optional SQLMesh templater and GitLab Code Quality output. GitHub annotations and SARIF were already available. That combination makes SQLFluff useful as a policy layer across editors and CI, especially when one company has several warehouses. The tradeoff is equally concrete: every additional grammar and template boundary creates another place where an innocent-looking format rule can misunderstand meaning.

What happened when we ran it

Our sandbox installed commit d5ae64c in 80 seconds, pulling 84 packages and occupying 165 MB. The build completed successfully in 8 seconds. Pip-audit reported 0 known vulnerabilities. We ran it in an unprivileged Debian container with Python 3.12, 3 CPUs, 8 GB of RAM, and no secrets.

Tests did not finish within the 900-second limit. The last output showed normal progress dots moving from 49% through 54%, with no failure traceback in the supplied tail. The correct result is a timeout, not a failed suite and not a pass. We cannot say how long the remaining tests would have taken or whether a later test would have failed.

The checkout itself was substantial: 6,087 files, about 220,773 lines of source, and 26.1 MB before dependencies. It had 15 CI workflow files, a Dockerfile, a compose file, and a tests directory. Installing and building are reasonable on a small runner. Running the complete contributor checks needs more than the 15 minutes our sandbox allowed.

Automatic fixes belong behind a reviewed diff

Lint findings are the low-risk entry point because a developer can judge the warning before changing a query. sqlfluff fix deserves a stricter gate. Open issue 8626 shows RF03 removing qualifiers inside a T-SQL APPLY subquery. The reported predicate changed from a correlated comparison to patientid = patientid, which stays valid SQL while becoming true for non-null values.

Issue 8611 is more direct. On SQLFluff 4.3.0, several layout fixes deleted source text when an identifier crossed a Jinja tag. The command reported the file as fixed and exited 0 in the supplied reproductions. Version 4.4.0 includes many fixes, but its release notes do not identify that open report as resolved. Run fixes on a branch, inspect semantic changes, and execute warehouse-specific tests before merging.

Templates and the Rust parser add separate compatibility edges

The default Python route installs with pip install sqlfluff. dbt support requires its plugin, and 4.4.0 gives SQLMesh its own optional templater. Template rendering is part of correctness because SQLFluff must map generated SQL back to source files. Issue 8624 also reports two default layout rules alternating forever on an overlength single-target SELECT, reproducing the loop across 7 dialects.

The optional rs extra can speed parser work through a prebuilt ABI3 wheel on supported CPython 3.10+ systems. An unsupported platform falls back to a source build and therefore needs Rust plus C or C++ tools. Open issue 8612 documents a Databricks grammar case where the Python and Rust parsers produce different results. Test the parser choice against your own dialect fixtures before standardizing it in CI.

Narrower tools win when formatting is the whole policy

sqruff is a Rust linter and formatter with its own language server plus VS Code and Zed integrations. It is the closest alternative when teams want lint rules and editor feedback without adopting SQLFluff's Python and templater stack. Check its dialect and rule coverage against your project first, since portability does not replace the grammar you need.

SQL Formatter confines itself to whitespace formatting across several query languages, while pgFormatter concentrates on PostgreSQL syntax. Either can be easier to explain in a repository that only wants consistent layout. SQLFluff earns its larger 165 MB installed environment when 28 dialects, rendered templates, structural rules, and CI annotations are requirements rather than future possibilities.

A one-day-old release and same-day push show active maintenance

Version 4.4.0 shipped on October 2, 2026, and the repository was pushed again on October 3. GitHub showed 9,914 stars and 351 combined open issues and pull requests. The release added SQLMesh support, GitLab output, custom Jinja delimiters, and fixes across several dialects. A large open queue is unsurprising for 28 grammars, but it makes issue search part of an upgrade review.

Start by pinning the dialect, selecting a small rule set, and running lint without fixes. Add template plugins only where the source actually uses them. Once warnings match the team's intent, introduce reviewed fixes and regression queries for business-critical SQL. SQLFluff earns the operational work when one rule system replaces several warehouse-specific checks. A formatting-only repository can avoid the 165 MB environment and 900-second contributor-suite concern with a narrower tool.

Alternatives

ProjectWhat it isPick it when
sqruffA Rust SQL linter and formatter with an included language server.pick this instead when a portable Rust tool and editor integration matter more than SQLFluff's templater and dialect breadth.
SQL FormatterA JavaScript whitespace formatter for several query languages.pick this instead when you only need predictable layout and do not want a lint-rule system.
pgFormatterA command-line and CGI formatter focused on PostgreSQL syntax.pick this instead when PostgreSQL formatting is the whole requirement.

What people are saying

  1. [github-trending] sqlfluff/sqlfluff

Sources

  1. SQLFluff README
  2. SQLFluff repository facts
  3. SQLFluff 4.4.0 release
  4. T-SQL RF03 semantic change report
  5. Jinja source deletion report
  6. LT05 and LT09 loop report
  7. Python and Rust parser divergence report

More dev tools reviews

benilla · pi-gui · toolkit · ramda · ToolReplay · CUDA-for-AMD-Windows · the whole board →