- Home
- SQL Linters and Formatters
- SQLFluff
SQLFluff
Unit 82a James Carter Road, Mildenhall, Bury St. Edmunds, England, IP28 7DE
What it is
SQLFluff is a free, open-source SQL linter for ELT-oriented work. It parses SQL without requiring database access and reports style and syntax problems, helping teams separate code-review concerns about formatting from query behavior. A single command can automatically correct many violations. Documentation lists support for more than 25 dialects, including T-SQL, PostgreSQL, BigQuery, and Snowflake, plus more than 70 rules covering style, structure, and best practices. SQLFluff handles Jinja templating and dbt, and it can run in CI/CD workflows with GitHub Actions output for pull-request annotations. Custom rules, autofix, and CI support are listed capabilities. Installation is directed through PyPI with pip or another Python package manager. SQLFluff itself does not execute SQL, although templating macros such as dbt’s run_query may execute arbitrary SQL. Its Jinja templater uses Jinja2 SandboxedEnvironment to limit unsafe code execution. The dbt templater requires a relevant adapter and sqlfluff-templater-dbt package; compile-time database access may also be needed.
For and against
For
- Free under the MIT License
- Supports more than 25 SQL dialects
- Automatically fixes many violations
- Runs without database access
- Integrates with CI/CD workflows
Against
- dbt templater needs an adapter package
- Some dbt models require database access
- Templating macros may execute SQL
The verdict
SQLFluff combines dialect-aware parsing, extensive rules, autofix, and CI integration in a free package. Teams using dbt or Jinja should review the additional setup and execution considerations.
Who it suits
It suits teams reviewing SQL in ELT projects, especially those working across multiple dialects or using Jinja and dbt. It is also useful for projects that want linting and autofix in CI/CD pipelines.
Plans and prices
SQLFluff
Open source SQL linter; released under the MIT License
Read 5 Oct 2026 · sqlfluff.com
On the record
- Auto-fix
- SQLFluff can automatically fix many linting violations with a single command.docs.sqlfluff.com · read 5 Oct 2026
- dbt requirements
- Using the dbt templater requires installing the relevant dbt adapter and sqlfluff-templater-dbt package, and models that access a database at compile time require database access.docs.sqlfluff.com · read 5 Oct 2026
- Dialect support
- The documentation says SQLFluff supports more than 25 SQL dialects, including T-SQL, PostgreSQL, BigQuery, and Snowflake.docs.sqlfluff.com · read 5 Oct 2026
- Installation
- The project’s website directs users to install SQLFluff from PyPI using pip or another Python package manager.sqlfluff.com · read 5 Oct 2026
- Integrations
- SQLFluff can be used in CI/CD pipelines and supports GitHub Actions output for pull request annotations.docs.sqlfluff.com · read 5 Oct 2026
- Linting
- It reports SQL style and syntax issues so teams can focus code reviews on function rather than form.sqlfluff.com · read 5 Oct 2026
- Maintainer
- The website identifies SQLFluff Ltd. as incorporated in England and gives its registered address as Unit 82a James Carter Road, Mildenhall, Bury St. Edmunds, England, IP28 7DE.sqlfluff.com · read 5 Oct 2026
- Parsing
- It parses SQL to catch syntax issues without requiring database access.sqlfluff.com · read 5 Oct 2026
- Purpose
- SQLFluff is an open source, dialect-flexible SQL linter designed with ELT applications in mind.sqlfluff.com · read 5 Oct 2026
- Rules
- The documentation lists more than 70 linting rules covering style, structure, and best practices.docs.sqlfluff.com · read 5 Oct 2026
- Security
- SQLFluff does not execute SQL itself, but templating macros such as dbt’s run_query may execute arbitrary SQL; its Jinja templater uses Jinja2 SandboxedEnvironment to limit unsafe code execution.docs.sqlfluff.com · read 5 Oct 2026
- Support
- The project lists documentation, GitHub, Slack, and Stack Overflow as community channels.sqlfluff.com · read 5 Oct 2026
- Templating
- SQLFluff supports Jinja templating and dbt.sqlfluff.com · read 5 Oct 2026