skillfed

collate-sqlfluff

The SQL Linter for Humans

collate-sqlfluff v3.5.3 770.9K downloads/30d#5,103 on PyPI0
Permissive license MIT License Copyright (c) 2023 Alan Cruickshank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) Active released

What it is and what it does

SQLFluff is a dialect-aware SQL linter designed to catch formatting, spacing, and style issues in SQL code. It supports a wide range of SQL dialects—including Snowflake, BigQuery, PostgreSQL, MySQL, Redshift, DuckDB, and many others—as well as Jinja templating and dbt projects. The tool can both report violations and automatically fix most of them, making it useful for enforcing consistent SQL style across teams and codebases.

You use it primarily as a command-line tool (via `sqlfluff lint` and `sqlfluff fix`) but can also integrate it into Python workflows through its API. It has 13 runtime dependencies including click for CLI, Jinja2 for template support, and pytest for testing. The package is actively maintained with monthly releases and works on Python 3.9 through 3.13.

Use it for:

  • Enforce consistent SQL formatting and style across a team's dbt project or data pipeline.
  • Automatically fix whitespace, indentation, and spacing issues in SQL files during CI/CD.
  • Lint SQL code in multiple dialects without rewriting rules for each database system.
  • Integrate SQL quality checks into a pre-commit hook or IDE workflow.
  • Validate SQL templates that use Jinja variables before execution.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

SQLFluff is a SQL linter and auto-fixer that checks SQL code for style and syntax errors across multiple SQL dialects, with support for Jinja templating and dbt.

Yes. SQLFluff is production-stable, actively maintained, permissively licensed under MIT, and has low install friction. It solves a real problem—enforcing SQL code quality across dialects—with broad dialect support and auto-fix capability. No known vulnerabilities. Install it if you need to lint or format SQL in your codebase or data pipeline.

Install

collate-sqlfluff on PyPI

pip

pip install collate-sqlfluff

uv

uv add collate-sqlfluff

poetry

poetry add collate-sqlfluff

Installing collate-sqlfluff

Before you install

Low install friction with a pure-Python wheel and 13 common runtime dependencies. Active maintenance with releases monthly and a recent commit on 2026-05-28.

License in practice

MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install collate-sqlfluff

from sqlfluff.core import Linter

linter = Linter(dialect='ansi')
result = linter.lint_string('SELECT a FROM tbl')

Requires Python 3.9 or later.

Verify before relying

  • Whether the package's Python API is considered stable or subject to breaking changes between minor versions.
  • Performance characteristics when linting large SQL files or many files in batch.

Package facts

License MIT License Copyright (c) 2023 Alan Cruickshank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 13 — platformdirs, chardet, click, colorama, diff-cover, Jinja2, pathspec, pytest, pyyaml, regex, tblib, tomli, tqdm
Maintenance actively maintained — 78 days since the last release
Last repo commit
First released
Downloads 770,912/month — #5,103 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: collate_sqlfluff-3.5.3-py3-none-any.whl

Keywords: sqlfluff, sql, linter, formatter, athena, bigquery, clickhouse, databricks, db2, doris, duckdb, exasol, flink, greenplum, hive, impala, materialize, mariadb, mysql, postgres, redshift, snowflake, soql, sparksql, sqlite, starrocks, teradata, trino, tsql, vertica, dbt

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: SQLTopic :: Software Development :: Quality AssuranceTopic :: Utilities

Tags

sql lintersql formattersql style checkersql code qualitysql auto-fixsql dialect supportdbt sql linting
sql-lintingcode-qualitydbt-integration

More Utilities packages