SQLFluff : A SQL Linter And Auto-Formatter For Humans

SQLFluff is a dialect-flexible and configurable SQL linter. Designed with ELT applications in mind, SQLFluff also works with jinja templating and dbt. SQLFluff will auto-fix most linting errors, allowing you to focus your time on what matters.

Getting Started

To get started, install the package and run sqlfluff lint or sqlfluff fix.

$ pip install sqlfluff
$ echo ” SELECT a + b FROM tbl; ” > test.sql
$ sqlfluff lint test.sql
== [test.sql] FAIL
L: 1 | P: 1 | L003 | Single indentation uses a number of spaces not a multiple of 4
L: 1 | P: 14 | L006 | Operators should be surrounded by a single space unless at the start/end of a line
L: 1 | P: 27 | L001 | Unnecessary trailing whitespace

You can also have a play using SQLFluff online.

For full CLI usage and rules reference, see the docs.

Documentation

For full documentation visit docs.sqlfluff.com.

Releases

SQLFluff is in beta phase – expect the tool to change significantly with potentially non-backward compatible api and configuration changes in future releases. If you’d like to join in please consider contributing.

New releases are made monthly. For more information, visit Releases.

SQLFluff on Slack

We have a fast-growing community on Slack, come and join us!

https://join.slack.com/t/sqlfluff/shared_invite/zt-o1f4x0e8-pZzarAIlQmKj_6ZwD16w0g

R K

Recent Posts

Pake : Transforming Webpages Into Desktop Applications

Pake is an innovative tool designed to convert any webpage into a desktop application with…

44 minutes ago

Bevy : Exploring The Frontier Of Game Development With Rust

Bevy is an open-source, data-driven game engine built in Rust, designed to simplify game development…

44 minutes ago

AppFlowy Cloud : Enhancing Collaboration With Secure Cloud Infrastructure

AppFlowy Cloud is a robust component of the AppFlowy ecosystem, designed to provide secure user…

20 hours ago

Kovid-Obfuscation-Passes : Unraveling Advanced Techniques For Enhanced Code Security

The "kovid-obfusctaion-passes" project is a comprehensive collection of LLVM and GCC plugins designed to implement…

20 hours ago

FFmpeg’s asm-Lessons : Mastering Assembly For Multimedia Optimization

The asm-lessons repository introduces learners to assembly language programming within the context of FFmpeg, a…

20 hours ago

NetExec Cheatsheet : A Comprehensive Guide

NetExec, also known as nxc, is a powerful network hacking tool designed to automate security…

1 day ago