NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2529 most downloaded on PyPI
Lint your dbt project SQL
Last release 1 months ago
07 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
106 releases · first in 2021
One column per quarter.
There's a *lot* in this release. Most of it is under the covers and so shouldn't cause any breaking changes for most users. If your use case depends o…
There's a lot in this release. Most of it is under the covers and so shouldn't cause any breaking changes for most users. If your use case depends on some of the internals of SQLFluff, you may find some breaking changes. The bigger changes are:
.match() methods, and also removes the parse_grammar attribute on any dialect segments. We are not aware of any 3rd party libraries which rely on these APIs however and so have not triggered a more major release. These lead to significant performance improvements during parsing.ParseMode option has enabled the removal of the StartsWith, GreedyUntil and EphemeralSegment parser classes.Alongside the big things this also includes a host of bugfixes, dialect improvements and CI/testing improvements.
This release also sees a bumper crop of new contributors, thanks to @dehume, @andychannery, @Kylea650, @robin-alphasophia, @jtbg, @r-petit, @bpfaust, @freewaydev & @abdel who all made the first contibutions in this release! 🎉🎉🎉
BaseSegment hash in reflow #5320 @alanmcruickshankBEGIN..EXCEPTION...END block #5307 @abdel_process_lint_result #5304 @alanmcruickshankHISTORY_RETENTION_PERIOD sequence to the table option segment #5273 @r-petitGreedyUntil #5263 @alanmcruickshanktype to instance_types #5253 @alanmcruickshankparse_grammar #5189 @alanmcruickshankBaseSegment.copy() isolation #5206 @alanmcruickshankAnything() + Strip most of the other parse_grammar #5186 @alanmcruickshankAnyNumberOf #5187 @alanmcruickshankparse_mode and remove StartsWith & EphemeralSegment. #5167 @alanmcruickshankMuch of this release is internal optimisations and refactoring. We're in the process of upgrading some quite old code in the parser, most of which sho
Much of this release is internal optimisations and refactoring. We're in the process of upgrading some quite old code in the parser, most of which should not be visible to end users (apart from perhaps some performance improvements!).
This release also allows missing template variables in the placeholder templater to be automatically filled with the name of the variable rather than raising an error (see: #5101).
Beyond that this includes some dialect improvements for DuckDB, SparkSQL, Snowflake, Redshift & Postgres.
Thanks particularly to @shyaginuma, @Fullcure3, @adilkhanekt & @pilou-komoot who made their first contributions as part of this release. 🎉🎉🎉
enforce_whitespace_preceding_terminator #5162 @alanmcruickshankDelimited #5161 @alanmcruickshankterminator > terminators on StartsWith #5152 @alanmcruickshankterminator > terminators on Delimited grammar #5150 @alanmcruickshankThis release is primarily a performance release, with most major changes aimed at the linting and fixing phases of operation. Most of the longest dura
This release is primarily a performance release, with most major changes aimed at the linting and fixing phases of operation. Most of the longest duration rules (excepting the layout rules) should see noticeable speed improvements.
Alongside those changes, there are a selection of bugfixes and dialect improvements for Oracle, PostgreSQL, Snowflake & TSQL.
fix) #5119 @alanmcruickshankEXCEPT #5126 @ulixius9This release brings one new dialect, two new rules and some changes to the CLI:
This release brings one new dialect, two new rules and some changes to the CLI:
ST09 / structure.join_condition_order: Which checks whether tables referenced in JOIN clauses are referenced in the order of their definition. By default this means that in the ON clause, the column referencing the table in the FROM clause should come before the column referencing the table in the JOIN clause (e.g. ... FROM a JOIN b on a.c = b.c). This rule was also the first contribution to the project from @thibonacci 🏆.AL08 / aliasing.unique.column: Which checks that column aliases and names are not repeated within the same SELECT clause. This is normally an error as it implies the same column has been imported twice, or that two expressions have been given the same alias.--profiler option on sqlfluff parse has been removed. It was only present on the parse command and not lint or fix, and it is just as simple to invoke the python cProfiler directly.--recurse cli option and sqlfluff.recurse configuration option have both been removed. They both existed purely for debugging the parser, and were never used in a production setting. The improvement in other debugging messages when unparsable sections are found means that this option is no longer necessary.Along side these more significant changes this also includes:
AL04, AL05, AM04, RF01 & ST05 which cumulatively may save up to 30% on the total time spend in the linting phase for some projects.This is primarily a bugfix release for 2.2.0 which introduced a bug in the exit_code returned by linting commands which ignored errors while setting p
This is primarily a bugfix release for 2.2.0 which introduced a bug in the exit_code returned by linting commands which ignored errors while setting processes > 1.
In addition to that this release introduces bugfixes for:
dbt exceptions.-f yaml or -f json alongside the dbt templater.This also introduces dialect improvements for Oracle and for LIMIT clauses.
Thanks also to @adityapat3l who made their first contribution as part of this release! 🎉🎉🎉
_prune_options within _longest_trimmed_match. #5063 @alanmcruickshankThis release changes some of the interfaces between SQLFluff core and our plugin ecosystem. The only *breaking* change is in the interface between SQL
This release changes some of the interfaces between SQLFluff core and our plugin ecosystem. The only breaking change is in the interface between SQLFluff and templater plugins (which are not common in the ecosystem, hence why this is only a minor and not a major release).
For all plugins, we also recommend a different structure for their imports (especially for rule plugins which are more common in the ecosystem) - for performance and stability reasons. Some users had been experiencing very long import times with previous releases as a result of the layout of plugin imports. Users with affected plugins will begin to see a warning from this release onward, which can be resolved for their plugin by updating to a new version of that plugin which follows the guidelines.
For more details (especially if you're a plugin maintainer) see our release notes.
Additionally this release includes:
FluffConfig object directly, and better support for parsing config files directly from strings (see the included example).AM06.--warn-unused-ignores CLI option (and corresponding config setting) to allow warnings to be shown if any noqa comments in SQL files are unused.Thanks also to @kaiyannameighu, @josef-v, @aglebov & @joaostorrer who made their first contributions as part of this release! 🎉🎉🎉
ADD COLUMN IF NOT EXISTS syntax on ALTER TABLE #5035 @wfelipewnoqa directives #5029 @alanmcruickshankmake_template to render_func in jinja and dbt #4942 @alanmcruickshank…both their layout rules and for any removed or deprecated settings.
This release brings some meaningful performance improvements to the parsing of complex SQL statements. In files with deeply nested expressions, we have seen up to a 50% reduction on time spent in the parsing phase. These changes are all internal optimisations and have minimal implications for the parser. In a few isolated cases they did highlight inconsistencies in the parsing of literals and so if your use case relies on the specific structure of literal and expression parsing you may find some small differences in how some expressions are parsed.
Additionally this release brings new validation steps to configuration. Layout configuration is now validated on load (and so users with invalid layout configurations may see some of these being caught now) and inline configuration statements in files are also now validated for both their layout rules and for any removed or deprecated settings.
On top of both we've seen dialect improvements to Databricks, PostgreSQL, BigQuery, Snowflake & Athena.
CROSS JOIN syntax #4996 @tunethewebThis release is a fairly standard incremental release. Highlights include bugfixes to RF05 and dialect improvements to Snowflake, Teradata, MySQL, TSQ
This release is a fairly standard incremental release. Highlights include bugfixes to RF05 and dialect improvements to Snowflake, Teradata, MySQL, TSQL, SparkSQL & Postgres.
Internally, the last few weeks have brought several improvements to developer tooling.
We've also moved over to GitHub sponsorships - so if you previously used the old flattr link, you can find our new profile page at https://github.com/sponsors/sqlfluff.
…as the folks at dbt-labs have often backported breaking changes to their internal APIs to previous versions of dbt-core. This release does at least br…
This release resolves compatibility issues with a set of dbt-core versions.
dbt-core 1.5.2 onwards is now properly supported.dbt-core 1.1 to 1.4 has now been re-enabled after support had to be abandoned a few releases ago.NOTE: We cannot guarantee that SQLFluff will always continue to remain compatible with all dbt versions, particularly as the folks at dbt-labs have often backported breaking changes to their internal APIs to previous versions of dbt-core. This release does at least bring more extensive internal testing to catch when this does occur to allow our community to react.
This release fixes also resolves a potential security issue for when using external libraries (and the library_path config setting), and also contains various dialect improvements.
SQLFLUFF_JINJA_FILTERS #4932 @dmohnsDROP EXTERNAL TABLE #4919 @keen85$ and # in identifier #4903 @ulixius9profiles dir env var or default (#4886) @JasonGluck
struct in TO_JSON (#4879) @dimitris-flyrgroup by (#4869) @KulykDmytroCUBE ROLLUP GROUPING SETS (#4862) @KulykDmytroThis release brings support for dbt 1.5+. Some internals of dbt mean that SQFluff versions prior to this release may experience errors with dbt versio
This release brings support for dbt 1.5+. Some internals of dbt mean that SQFluff versions prior to this release may experience errors with dbt versions post 1.5. In addition to that there are some dialect and templating improvements bundled too:
CASE WHEN clauses.WHEN blocks and introduce indented_then_contents #4755 @borcheroThis is a bugfix release to resolve two regressions included in 2.0.6 related to implicit indents. This also includes a bugfix for config file on osx,
This is a bugfix release to resolve two regressions included in 2.0.6 related to implicit indents. This also includes a bugfix for config file on osx, contributed by first time contributor @jpuris 🎉.
Introduction of a --quiet option for the CLI for situations where less output is useful.
--quiet option for the CLI for situations where less output is useful.--force option is used for sqlfluff fix each file is fixed during the linting process rather than at the end.layout.end-of-file to layout.end_of_file in line with other rules.SAFE prefix segment (#4773) @dmohnsThis is a relatively swift bugfix to refine some of the changes made to widow function indentation in 2.0.4. In addition there are two dialect refinem
This is a relatively swift bugfix to refine some of the changes made to widow function indentation in 2.0.4. In addition there are two dialect refinements also made since that release.
This is primarily a _bugfix_ and _dialect_ release:
This is primarily a bugfix and dialect release:
--persist-timing option is now also available on sqlfluff fix.Thanks also to @james-johnston-thumbtack and @Thashin who made their first contributions in this release. In particular, @james-johnston-thumbtack made twenty one contributions in their first month! 🎉🎉🎉
fix too. #4679 @alanmcruickshankThis is primarily a _bugfix_ and _dialect_ release:
This is primarily a bugfix and dialect release:
THEN in CASE statements (see #4598).TypedParser, LT03 & LT04.--persist-timing option for deeper performance understanding.We also saw a huge number of first time contributors with 9 contributing in this release 🎉🏆🎉.
is_alias_required as a private class so it doesn't appear in docs #4673 @tunethewebOPENJSON() #4652 @keen85Create External Table #4642 @aly76MERGE INSERT clause #4666 @dmohnsCREATE EXTERNAL FILE FORMAT #4647 @keen85sqlcmd commands :r and :setvar #4653 @keen85PERIOD FOR SYSTEM_TIME (temporal tables) #4654 @keen85CREATE EXTERNAL DATA SOURCE #4634 @keen85WITH ORDINALITY clauses in Postgres #4599 @tunethewebThis is primarily a _bugfix_ release. Most notably this solves some of the issues introduced in 2.0.1 around spacing within datatypes. Expressions lik
This is primarily a bugfix release. Most notably this solves some of the issues introduced in 2.0.1 around spacing within datatypes. Expressions like 1.0::double precision should now be spaced correctly.
Beyond that, this contains a selection of smaller bugfixes and dialect improvements. Even for a relatively small release we saw three new contributors (thanks @aurany, @JackWolverson & @mikaeltw 🎉).
The one new feature (as such) is being able to now configure LT05 (aka layout.long_lines) to optionally move trailing comments after the line they are found on, rather than the default behaviour of moving them up and before. Users can enable this with the trailing_comments configuration setting in the indentation section.
This release also contains some performance optimisations in the parser, especially on queries with heavily nested expressions. There will be more to come in this space, but we hope this leads to a better experience for many users. 🚀
Github Action Deprecations (#4545) @alanmcruickshank
This is mostly a bugfix release addressing some of the issues from the recent 2.0 release. Notable fixes are:
LT01) for datatypes, hyphenated identifiers and casting operators.LT02), in particular with implicit indents.LT09 and LT02, by only limiting LT09 to bringing targets onto a single line if there is only one select target and that it contains no newlines.pyproject.toml.This release also brings one small new feature in allowing additional flags to be passed to SQLFluff when called as a pre-commit hook.
Thanks especially to @JavierMonton and @LauraRichter who made their first contributions to the project as part of this release! 🎉🏆
sqlfluff invocations in pre-commit hooks (#4546) @borcherocreate user statement (#4514) @JavierMontonUpgrading to 2.0 brings several important breaking changes:
Upgrading to 2.0 brings several important breaking changes:
L00X formats into groups within similar codes (e.g. an aliasing group with codes of the format AL0X), but also given names to allow much clearer referencing (e.g. aliasing.column).L001, L005, L006, L008, L023, L024, L039, L048 & L071 have been combined simply into LT01.1.1.To help users upgrade to 2.0, we've put together a recommended process as part of our release notes.
Beyond the breaking changes, this release brings a load of additional changes:
sqlfluff format CLI command (a la sqlfmt or black) to auto-format sql files using a known set of fairly safe rules.sparksql).As a new major release, especially with significant rewrites of large portions of the codebase, we recommend using compatible release specifiers in your dependencies (i.e. sqlfluff~=2.0.0) so that you can automatically take advantage of any bugfix releases in the coming weeks. The alpha releases of 2.0.0 have been tested on a range of large projects, but we know that the range of use cases "in the wild" is very diverse. If you do experience issues, please post them on GitHub in the usual manner.
Finally thanks to everyone who has worked on this release, especially @konnectr, @ValentinCrr, @FabianScheidt, @dflem97, @timcosta, @AidanHarveyNelson, @joar, @jmpfar, @jared-rimmer, @vesatoivonen, @briankravec, @saintamh, @tdurieux, @baa-ableton & @WillAyd who made their first contributions during the development of 2.0.0. Thanks for your contributions, and especially your patience in the slightly slower release of your efforts into the wild. 🙏🎉
UNPIVOT clauses #4494 @imrehgtoml dependency if < Python 3.11 (otherwise use builtin tomllib) #4303 @kevinmarsh> NOTE: This is effectively a release candidate for testing purposes. There are several new features here, and breaking changes to configuration. We w…
NOTE: This is effectively a release candidate for testing purposes. There are several new features here, and breaking changes to configuration. We welcome testing feedback from the community, and the intent is that following this release there will be no more major breaking changes in the before the 2.0.0 release.
This is the sixth alpha release for 2.0.0, and effectively the first release candidate for 2.0.0. All the intended breaking changes for the upcoming release have now been made and only bugfixes and non breaking feature changes should happen between this release and the full release.
It contains:
sqlfluff format CLI command (a la sqlfmt or black) to auto-format sql files using a known set of fairly safe set of rules.sparksql).There are also numerous dialect improvements to ANSI, Athena, TSQL, Teradata, SQLite & MySQL.
> here, and breaking changes to configuration. We welcome testing feedback from the
NOTE: This is an alpha release for testing purposes. There are several new features here, and breaking changes to configuration. We welcome testing feedback from the community, but know that this release may feel less polished than usual.
This is the fifth alpha release for 2.0.0. It contains:
There will likely be more changes to rule classification before a full release of 2.0.0, so anticipate that configuration files may change slightly again in future alpha releases.
BigQuery: Alter table alter column (#4316) @greg-finley
toml dependency if < Python 3.11 (otherwise use builtin tomllib) (#4303) @kevinmarsh> here, and breaking changes to configuration. We welcome testing feedback from the
NOTE: This is an alpha release for testing purposes. There are several new features here, and breaking changes to configuration. We welcome testing feedback from the community, but know that this release may feel less polished than usual.
This is the third alpha release for 2.0.0. It contains primarily bugfixes from 2.0.0a2 to allow continued testing. In particular, some of the recent 2.0.0-related changes to the dbt templater have been reverted, primarily due to performance and other issues. If those issues can be resolved, the changes will be re-introduced. The long-term goal of this work is to ease maintenance of the templater by separating dbt integration concerns from SQLFluff concerns.
There will likely be more changes to rule classification before a full release of 2.0.0, so anticipate that configuration files may change slightly again in future alpha releases.
> NOTE: This is an alpha release for testing purposes. There are several new features here, and breaking changes to configuration. We welcome testing…
NOTE: This is an alpha release for testing purposes. There are several new features here, and breaking changes to configuration. We welcome testing feedback from the community, but know that this release may feel less polished than usual.
This is the second alpha release for 2.0.0. It contains primarily bugfixes from 2.0.0a1 to allow continued testing along with dialect improvements for Snowflake, Postgres and DB2.
There will likely be more changes to rule classification before a full release of 2.0.0, so anticipate that configuration files may change slightly again in future alpha releases.
> NOTE: This is an alpha release for testing purposes. There are several new features here, and breaking changes to configuration. We welcome testing…
NOTE: This is an alpha release for testing purposes. There are several new features here, and breaking changes to configuration. We welcome testing feedback from the community, but know that this release may feel less polished than usual.
This is the first alpha version for 2.0.0. It brings all of the changes to whitespace handing, including a total rewrite of indentation and long line logic (L003 & L016). That brings several breaking changes to the configuration of layout, see the layout docs for more details and familiarise yourself with the new default configuration.
In addition, for the dbt templater, this introduces a large re-write of the codebase, dropping support for dbt versions before 1.0.0. This leverages functionality from dbt-osmosis to reduce the amount of functionality supported directly by SQLFluff, and performance during testing of the new version has been reported as significantly faster.
There will likely be more changes to rule classification before a full release of 2.0.0, so anticipate that configuration files may change slightly again in future alpha releases.
Note that 2.x.x will bring a selection of breaking changes to config file structure, rule categorisation and dbt support.
This is a bugfix release, primarily for diff-quality. In addition, a new rules for spacing around parenthesis is also included.
This is also the final 1.x.x release. Following releases will be a series of alpha releases for 2.x.x. If you affected by any outstanding bugs or regressions from this release, consider either rolling backward to a previous release without those issues, or failing forward to on an alpha release for 2.x.x (or a full release if that's out). Note that 2.x.x will bring a selection of breaking changes to config file structure, rule categorisation and dbt support.
Bug fix for 1.4.3 which was incorrectly flagging L006 for concat operators (||) and other two-symbol binary operators.
Bug fix for 1.4.3 which was incorrectly flagging L006 for concat operators (||) and other two-symbol binary operators.
Allow deprecated --disable_progress_bar flag for fix command #4151 @pdebelak
diff-quality plugin to run SQLFluff as a subprocess. More reliable, easier to switch between diff-quality and running sqlfluff lint directly.AS as optional keyword for CTE & CTS #4127 @ulixius9This release is less about internals and much more about some quality of life improvements and dialect changes. The most notable are:
This release is less about internals and much more about some quality of life improvements and dialect changes. The most notable are:
sqlfluff render command to preview the results of templated sql.{% set %} statements should now be more consistent.We've also got dialect improvements for Redshift, SOQL & SparkSQL.
get_rules hook of plugin example (#4060) @Samyak2This is a fix to the configuration migration from 1.4.0. In that release, the configuration of leading/trailing operators would be migrated the wrong
This is a fix to the configuration migration from 1.4.0. In that release, the configuration of leading/trailing operators would be migrated the wrong way around and precedence between new and old configuration values behaved unexpectedly.
These changes are driven by underlying centralisation in the routines which control layout. While for this release, no breaking changes are expected -…
This release brings several internal changes, and acts as a prelude to 2.0.0 which will be released fairly soon. In particular, the following config values have changed:
sqlfluff:rules:L007:operator_new_lines has been changed to sqlfluff:layout:type:binary_operator:line_position.sqlfluff:rules:comma_style and sqlfluff:rules:L019:comma_style have both been consolidated into sqlfluff:layout:type:comma:line_position.If any of these values have been set in your config, they will be automatically translated to the new values at runtime, and a warning will be shown. To silence the warning, update your config file to the new values. For more details on configuring layout (including some changes yet to come in future versions) see the docs.
These changes are driven by underlying centralisation in the routines which control layout. While for this release, no breaking changes are expected - you may find slight differences in how SQLFluff handles edge cases. We believe in the majority of cases these are more consistent, but if you find any which are problematic then do post an issue on GitHub as usual.
Other highlights from this release:
There have also been first time contributions from 10 new contributors! 🎉🎉🎉
Linter (#3977) @Samyak2markupsafe (#3967) @judahrandQUALIFY usage without WHERE clause (applies also for Databricks dialect) (#3930) @karabuluteDATABRICKS: Add Support for Delta Live Tables (DLT) Syntax (#3899) @R7L208This is primarily a release for dialect fixes and improvements with additions and changes to TSQL, Snowflake, MySQL & Redshift. The other changes of n
This is primarily a release for dialect fixes and improvements with additions and changes to TSQL, Snowflake, MySQL & Redshift. The other changes of note are:
More refactoring of parse structures in preparation for upcoming refactor of formatting/whitespace rules.
large_file_skip_byte_limit which applies prior to
loading the file.GRANT syntax #3807 @Gal40n04ekThis release brings several potentially breaking changes to the underlying parse tree. For users of the cli tool in a linting context you should notic…
This release brings several potentially breaking changes to the underlying parse tree. For users of the cli tool in a linting context you should notice no change. If however your application relies on the structure of the SQLFluff parse tree or the naming of certain elements within the yaml format, then this may not be a drop-in replacement. Specifically:
end_of_file meta segment at the end of the parse structure.template_loop meta segment to signify a jump backward in the source file within a loop structure (e.g. a jinja for loop).identifier and literal type segments will now appear in the parse tree with their more specific type (which used to be called name) e.g. naked_identifier, quoted_identifier, numeric_literal etc...If using the python api, the parent type (such as identifier) will still register if you call .is_type("identifier"), as this function checks all inherited types. However the eventual type returned by .get_type() will now be (in most cases) what used to be accessible at .name. The name attribute will be deprecated in a future release.
Other highlights:
--show-lint-violations to show details on unfixable errors when running sqlfluff fix.--ignore=templating is enabled, undefined Jinja variables now take on "reasonable" default values rather than blank string (""). This can streamline initial rollout of SQLFluff by reducing or eliminating the need to configure templater variables.There are also a ton of other features and bug fixes in this release, including first-time contributions from 11 new contributors! 🎉
ALTER TABLE #3727 @R7L208key from unreserved keywords list #3719 @sabrikaragonenDATEPART date type as date type instead of column name #3681 @borcheroCOLLATE clause in JOIN conditions #3680 @borcheroCALL Support #3659 @WittierDinosaurINTERSECT ALL and EXCEPT ALL #3657 @WittierDinosaurmerge_statement #3654 @barrywhartCONVERT function data type argument #3653 @pdebelak{% call ... %} blocks #3648 @barrywhartALTER TABLE #3643 @R7L208ALTER TABLE IF EXISTS and WHEN SYSTEM$STREAM_HAS_DATA() #3641 @chrisalexeevINTEGER to PrimitiveTypeSegment for Sparksql #3624 @ciwassanoignore_comment_clauses=True #3637 @barrywhartThis is primarily a bugfix release to resolve an issue with the 1.2.0 release where the new version of sqlfluff-templater-dbt relied on functionality
This is primarily a bugfix release to resolve an issue with the 1.2.0 release
where the new version of sqlfluff-templater-dbt relied on functionality
from the new version of sqlfluff but the package configuration had not
been updated. Versions of the two packages are now pinned together.
Adding AWS Athena as a dialect.
Major changes include:
ALTER TABLE #3596 @davidfuhrCREATE COLLATION support #3571 @greg-finleyTOP X to select clause modifiers #3582 @pdebelakCOMMENT ON #3566 @greg-finleyfix_string(). #3568 @alanmcruickshankignore_comment_clauses not working for postgres dialect #3549 @barrywhartL066 - New rule to allow you to set min/max length requirements for aliases to ensure they are meaningful
Major changes include:
blocked_regex as well as blocked_wordsFINAL modifier #3534 @ThomAubHAVING, WHERE, GROUP BY #3526 @R7L208VALUES clause #3533 @barrywhartCALL statement #3529 @greg-finleyMultiStringParser to match a collection of strings #3510 @judahrandPRIMARY KEY AUTOINCREMENT #3527 @greg-finleyLOAD DATA #3518 @greg-finleyGRANT EXECUTE ON PROCEDURES #3516 @greg-finleyDEFAULT expression in Redshift ALTER TABLE ADD COLUMN statements #3513 @menzenskiload_macros_from_path to actually support multiple paths #3488 @emancuRESTORE statement #3486 @R7L208SET clause #3483 @hgranthornerCONVERT TO DELTA command #3482 @R7L208GENERATE command #3478 @R7L208ON blocks #3471 @PeterBalsdonblocked_regex support #3467 @tunethewebDESCRIBE DETAIL command #3465 @R7L208This is the first _stable_ release of SQLFluff 🎉🎉🎉.
This is the first stable release of SQLFluff 🎉🎉🎉.
We've intentionally chosen to release 1.0.0 at a time of relative stability within SQLFluff and not at a time when new big structural changes are being made. This means that there's a good chance that this release is broadly usable. This also recognises that through the hard work of a huge number of contributors that we've built out this from a fringe tool, to something which gets over 500k downloads a month and over 4k stars on Github.
There's still a lot to do, and some more exciting things on the horizon. If you want to be part of this and join the team of contributors, come and hang out in our slack community or on our twitter account where people can help you get started. If you're a long time user, keep submitting bug reports and inputting on issues on Github.
If you've never used SQLFluff before, or are hesitant about starting to use it in your day to day work, now might be a good time to try it. We have guides on how to get started with the tool, and how to get started with rolling out to a team in our docs.
GENERATE_SERIES as a value table function (#3463) @tunethewebCONSTRAINTS in CREATE DOMAIN (#3460) @tunethewebANYELEMENT support (#3458) @tunethewebON CONFLICT support (#3452) @tunethewebALTER TYPE (#3451) @greg-finleyDESCRIBE HISTORY statement (#3447) @R7L208FROM clauses (#3446) @tunethewebdatabricks dialect as an alias for sparksql dialect (#3440) @R7L208{% block %} (#3436) @barrywhartVACUUM statement (#3439) @R7L208numeric_dollar templater to have curly braces, update dollar + numeric_dollar templater examples in docs (#3432) @menzenskiIDENTITY column (seed, step) to be optional (#3430) @menzenskiUPDATE statements with CTEs (#3397) @tunethewebignore_words (#3398) @dmohnsCREATE FUNCTION to use Expressions in default values (#3408) @tunethewebapply_fixes() with leading/trailing whitespace (#3407) @barrywhartALTER TABLE syntax (#3395) @tunethewebcolon_nospaces templating style (#3383) @benji-yorkFix bug causing L003 to report indentation errors for templated code - sorry we know that one's caused many of you some grief :-(
Major changes include:
FOR statements and CREATE PROCEDURE statements).RESPECT NULLS/IGNORE NULLS in window functions (#3376) @tunethewebRETURNS TABLE column type (#3379) @tunetheweb&&, ||, !) (#3359) @mdahlmanLOCK [TABLE] (#3350) @tunethewebcolon_nospaces, and cast to string (#3354) @tunethewebFOR..IN..DO...END FOR support (#3340) @tunethewebVALUES clauses (#3358) @tunethewebALTER SCHEMA (#3346) @mdahlmanSELECT..INTO support (#3351) @tunethewebCREATE TRIGGER (#3349) @tunethewebCASE keyword to Unreserved list (#3353) @tunethewebSET statement. (#3328) @cgkoutzigiannisdate_n_literal (#3344) @greg-finleySELECT statements (#3329) @greg-finleyCLUSTER, DISTRIBUTE, SORT BY (#3304) @barunpuriMERGE statements (#3292) @tunethewebREMOVE statement rework (#3308) @jmc-bbkPUT statement (#3307) @jmc-bbkGET statement (#3305) @jmc-bbkALTER EXTERNAL TABLE (#3302) @jmc-bbkPIVOT placement (#3298) @jpers36LIST statement enhancement (#3295) @jmc-bbkCreate User (#3289) @greg-finleyCREATE STAGE grammar enhancement for file formats (#3293) @jmc-bbkAddition of "rule groups" (currently core and all) to allow ease of turning on and off groups of rules.
Major changes include:
core and all) to allow ease of turning on and off groups of rules.db2 dialectAS in MERGE statements using SELECT #3276 @tunethewebEXPORT DATA statement #3267 @tunethewebCREATE TABLE support for COPY and LIKE #3266 @tunethewebFLUSH support #3269 @greg-finleyALTER TYPE support #3265 @greg-finleySELECT with comment on same line as SELECT keyword #3259 @barrywhartCREATE FILE FORMAT Support #3104 @jmc-bbkAnything() from match_grammars #3258 @tunethewebDOMAIN support #3257 @tunethewebEXECUTE #3255 @pguyotUNSIGNED support #3250 @tunethewebDROP TEMPORARY TABLE #3251 @tunethewebCREATE EXTERNAL TABLE statement #3241 @dmohnsCREATE INDEX columns #3240 @tunethewebcheck_still_complete and matching in StartsWith #3236 @tunethewebDROP Statements #3238 @chrisalexeevtox #3233 @tunethewebload_macros_from_path #3239 @barrywhartapply_fixes() to automatically fix violations of can_start_end_non_code #3232 @barrywhartfor xml path identifier #3230 @fdwSTRUCT support #3217 @tunethewebIF EXISTS work with UNION selects #3218 @fdwfix_even_unparsable setting was not being respected in .sqlfluff #3220 @barrywhartDELETE table support #3224 @tunethewebALTER MATERIALIZED VIEW statement #3215 @jmc-bbkDATE, DATETIME and TIME as a date parts for EXTRACT #3209 @tunethewebUPDATE statement support #3203 @tunethewebDROP EXTENSION syntax #3213 @tunethewebFLATTEN() table function aliases correctly in L025, L027, L028 #3194 @barrywhartLANGUAGE SQL #3202 @WittierDinosaurCREATE MATERIALIZED VIEW #3204 @tunethewebFOR XML statements #3193 @fdwREMOVE statement enhancement #3191 @jmc-bbkVIEW to unreserved keywords #3190 @WittierDinosaurEXPORT DATA #3177 @tunethewebFROM clause #3175 @tunethewebencoding setting in .sqlfluff file was not being respected #3170 @barrywhartPRS errors in red #3168 @OTooleMichaelStartsWith and make terminator mandatory when using it #3165 @tunethewebOUTPUT INTO #3162 @fdwCREATE TYPE statement #3154 @fdwTABLESAMPLE #3159 @barunpuriINSERT and DELETE #3155 @fdwNew Rule (L064) for preferred quotes for quoted literals
Major changes include:
ignore_words_regex configuration option for rulesGRANT/DENY/REVOKE #3149 @tunethewebVALUES in FROM clauses #3141 @tunethewebTRY_CONVERT #3143 @fdwNVARCHAR(MAX) #3130 @fdwINSERT INTO with bracketed SELECT in ANSI and BigQuery #3139 @tunethewebALTER TABLE - add support for WITH CHECK ADD CONSTRAINT and CHECK CONSTRAINT #3132 @nevadoStartsWith() in FromExpressionElementSegment caused performance issues for large queries #3128 @WittierDinosaurAT TIME ZONE parsing improvements #3115 @tunethewebCASE) triggers incorrectly (the ELSE contains additional code) #3113 @barrywhartignore_words_regex configuration option #3098 @dmohnsAT TIME ZONE support #3087 @tunethewebindented_using_on in MERGE statements ON #3096 @dmohnsCOLLATE in more clauses #3095 @tunethewebNORMALIZE function #3086 @tunethewebDROP FUNCTION support #3082 @tunethewebDROP EXTENSION #3083 @tunethewebEXEC = @Variable StoredProc Failed Parsing Bug (#3070) #3077 @MartynJones87UPDATE statement syntax #3073 @R7L208DELETE FROM syntax #3072 @R7L208LANGUAGE params #3068 @tunetheweb{% set a, b = 1, 2 %} #3066 @barrywhartsql_file_exts example #3059 @KulykDmytroSAFE functions #3048 @tunethewebUNNEST for L025 #3054 @tunethewebCREATE/DROP/ALTER USER/ROLE clean up for consistency #3045 @tunethewebALTER ROLE/ALTER USER support #3043 @mrfON CONFLICT Grammar #3027 @jmc-bbkDialect is now mandatory, either in command line, or in config BREAKING CHANGE
Major changes include:
spark3 dialect to sparksql BREAKING CHANGEJOINs in UPDATE expressions #3031 @zapionCREATE USER/CREATE ROLE support #3016 @mrfMERGE syntax #3025 @PhilippLangeexclude option for Ref grammar #3028 @tunethewebREMOVE statements #3026 @WittierDinosaurWEEK function with days of weeks #3021 @tunethewebSTRUCT #3023 @PhilippLangeCREATE TABLE with trailing comma #3018 @dmohnsIS (NOT) DISTINCT FROM test cases #3014 @kd2718OPTIONS in STRUCT definitions #3017 @dmohnsCREATE ROLE and DROP ROLE statements #3010 @dnimCLUSTER BY and other CREATE TABLE improvements #3008 @WittierDinosaurTRIM function parameters #3007 @tunethewebAT TIME ZONE in EXTRACT #3004 @tunethewebDECLARE #3006 @dmohnsAS keyword in parameters def #3001 @pguyotRETURNS @var TABLE syntax #3000 @pguyotDECLARE statements #2999 @pguyotGO #2997 @pguyotMERGE statement variants #2989 @dmohnsis_incremental() defaults consistent #2985 @dmohnsUPDATE Statements #2982 @WittierDinosaurCREATE EXTERNAL SCHEMA, bugfix in PARTITION BY #2983 @WittierDinosaurALTER INDEX and REINDEX to Postgres, Some Grammar Cleaning #2979 @WittierDinosaurSTRUCT params #2975 @tunetheweb-%}) #2976 @barrywhartOPTIONS #2973 @dmohnsOPTIONS clauses #2971 @dmohnsDatatypeIdentifierSegment #2959 @alanmcruickshankWAITFOR statement #2968 @pguyotWHILE statement support #2966 @pguyotINTO is optional within INSERT statement #2963 @pguyotIS (NOT) DISTINCT FROM support in most dialects #2962 @tunethewebCREATE/DROP/DISABLE TRIGGER #2957 @tunethewebOUTPUT Params and GOTO Statements #2949 @tunethewebspark3 to sparksql #2924 @R7L208ALTER STREAM support #2939 @HeyZikoCREATE STREAM support #2936 @HeyZikoUNPIVOT clauses #2925 @tunethewebMERGE statements #2926 @tunethewebAdded Support For Snowflake Inline Comments (#2919) @WittierDinosaur
get_identifier() on Postgres, Redshift dialects (#2899) @barrywhartcast rowtype definition (#2896) @KulykDmytrojson type support (#2894) @KulykDmytroARRAY support (#2891) @tunethewebPIVOT/UNPIVOT Redshift + Fixed Snowflake Bug + Standardized PIVOT/UNPIVOT Parsing (#2888) @PLBMRcast function (#2889) @KulykDmytroSTRUCT Array Support (#2881) @tunethewebBETWEEN statements (#2878) @MarcAntoineSchmidtQCA number of changes to fix code to make these more robust
Major changes include:
fix code to make these more robustgenerate_parse_fixture_yml options to allow quicker, partial regeneration of YML filesSHOW statements #2864 @R7L208_slice_template() function #2870 @barrywhart{% endif %} at end of file #2862 @barrywhartAT TIME ZONE #2863 @tunetheweb{% set %} blocks #2849 @barrywhartValueError: Position Not Found for lint/parse/fix in JinjaTracer #2846 @barrywhartSET and RESET spark runtime configurations #2839 @R7L208CONVERT function definition #2843 @tunethewebDESCRIBE statement #2837 @R7L208REFRESH statements into one class #2838 @R7L208NOW support #2825 @tunethewebDELETE FROM support #2823 @tunethewebIF #2824 @tunethewebfix on dialect fixtures #2818 @tunethewebCACHE AND UNCACHE auxiliary statements #2814 @R7L208CREATE VIEW AS SELECT #2816 @tunethewebMERGE syntax to most dialects #2807 @PhilippLangeChanges rule L030 to use extended_capitalisation_policy to support PascalCase BREAKING CHANGE
Major changes include:
extended_capitalisation_policy to support PascalCase BREAKING CHANGEimplicit aliasesLEFT/RIGHT/OUTER JOINsINTERVAL literals / expression #2804 @sti0IDLE_TIMEOUT and SNAPSHOT_MODE #2805 @sti0INSERT statements (7.1+) #2802 @sti0INSERT grammar #2798 @jpy-gitVALUES, make Spark3 VALUES consistent #2797 @jpy-gitINSERT DEFAULT value #2796 @jpy-gitAS optional in Postgres DELETE #2794 @jpy-gitUNEST aliases #2793 @tunethewebDELETE FROM grammar #2792 @jpy-gitDELETE FROM grammar #2791 @jpy-gitRETURNING grammar to INSERT INTO statement #2790 @jpy-gitPATTERN grammar #2788 @jpy-git[ALTER/CREATE/DROP] PROCEDURE segments #2774 @rpr-abletonANALYZE TABLE statement #2780 @R7L208MATCH_RECOGNIZE clause #2781 @jpy-gitLIMIT grammar #2784 @jpy-gitLIKE grammar #2779 @jpy-gitFILE and JAR statements #2778 @R7L208SET/UNSET MASKING POLICY grammar #2775 @jpy-git= --> IS #2760 @OTooleMichaelSELECT DISTINCT id query #2768 @barrywhartCHANGES clause #2764 @jpy-gitEXPLAIN statement #2767 @R7L208CONNECT BY clause #2763 @jpy-gitTRANSFORM clause #2762 @R7L208GROUP BY {CUBE|ROLLUP|GROUPING SETS} parsing #2759 @jpy-gitignore_words options to L057 and L059 #2753 @tunethewebPIVOT clause #2752 @R7L208inject_ctes_into_sql() #2748 @barrywhartCREATE USER #2744 @sti0load_macros_from_path #2743 @barrywhart=) #2745 @barrywhartBaseSegment.pos_marker is typed as non optional but sometimes set to None #2741 @barrywhartSIMILAR TO pattern matching expressions #2732 @PLBMR_eval() into individual functions to improve readability #2733 @barrywhartfix_str passes the rule #2624 @juhoautioLEFT/RIGHT/OUTER JOINs #2719 @rpr-ableton= #2727 @fdwCASE clause #2714 @R7L208WINDOW functions #2711 @R7L208RAISERROR parameters #2709 @jpers36OPTION clause to UPDATE #2707 @jpers36WHERE clause #2704 @R7L208PARTITION BY elements #2702 @jpers36SET TRANSACTION ISOLATION LEVEL parsing #2701 @jpers36LATERAL VIEW clause #2687 @R7L208CROSS joins #2680 @sti0CREATE INDEX/STATISTICS #2679 @jpers36TABLESAMPLE clause #2674 @R7L208RAISERROR functionality #2672 @jpers36MERGE INTO predicates #2670 @The-LoudImprovements to rules L023, L045, L048, L052, L059 to make them more accurate.
Major changes include:
sqlfluff fix cannot find a stable fix after runaway_limit iterations (default 10) then no fixes will be applied.--write-output config to command line so prevent errors corrupting output.SORT BY Clause (#2651) @R7L208CURRENT_TIMESTAMP() in CREATE TABLE (#2648) @tunethewebDELETE FROM syntax (#2643) @tunethewebQUALIFY clause (#2647) @barrywhartJOIN ON clause if join expression in parentheses (#2645) @barrywhartUNPIVOT and PIVOT fixes (#2619) @tunethewebORDER BY in SELECT (#2618) @R7L208LIMIT Clause (#2612) @R7L208LIKE clause (#2604) @R7L208Dropping support of DBT < 0.20 BREAKING CHANGE
Major changes include:
sqlfluff fix no will no longer fix SQL containing parsing or templating errors ** BREAKING CHANGE **click python packageJOIN clause enhancements (#2570) @R7L208COMMENT and WITH [NO] DATA clause usage. (#2583) @sti0LOCAL keywords in WHERE clause (#2582) @sti0LOCAL keyword within PREFERRING clause (#2579) @sti0SELECT REPLACE clauses. (#2550) @elyoboBetter datepart versus identifier parsing.
Major changes include:
click dependency error.HAVING clause in SELECT statement (#2517) @R7L208CUBE and ROLLUP in GROUP BY clause of SELECT statement (#2505) @R7L208DISTRIBUTE BY clause in SELECT statement (#2503) @R7L208CLUSTER BY clause in SELECT statement (#2491) @R7L208Full Changelog: https://github.com/sqlfluff/sqlfluff/compare/0.9.3...0.9.4
Add ignore_words option for rules L010, L014, L029, L030, L040
Major changes include:
ignore_words option for rules L010, L014, L029, L030, L040LOAD DATA statements (#2450) @R7L208We are pleased to include 110 improvements and fixes in this release, and welcome 7 new contributors to the code.
We are pleased to include 110 improvements and fixes in this release, and welcome 7 new contributors to the code.
Major changes include:
COALESCE instead of IFNULL or NVL!= over <>INSERT OVERWRITE DIRECTORY with Hive Format (#2389) @R7L208LOCAL.ALIAS Syntax (#2430) @sti0INSERT OVERWRITE DIRECTORY statements (#2385) @R7L208INSERT [TABLE] data manipulation statements (#2290) @R7L208AnySetOf grammar (#2326) @jpy-gitALTER TABLE's tableColumnAction grammar (#2332) @wong-codaioAlterTableStatement specific for Snowflake (#2267) @wong-codaioREFRESH auxiliary statements (#2282) @R7L208USE DATABASE statement. (#2276) @R7L208main (#2280) @barnettTRUNCATE statement in Spark3 dialect (#2272) @R7L208click version to 8.0+ to support click.shell_completion (#2271) @wong-codaioFix some SQL corruption issues with templated code
default definition of declare #2120 @KulykDmytrodbt_modules to dbt_packages #2143 @ciklistahive and redshift (L026, L028) #2154 @KulykDmytroObjectReferenceSegment #2190 @tdstarkCREATE TABLE LIKE syntax #2207 @R7L208CREATE VIEW into its own segment #2217 @wong-codaioDROP DDL statements for Spark3 #2215 @R7L208Refinement to Simple API to return parse output in JSON format rather than as an internal SQLFluff object (BREAKING CHANGE).
This release brings about several great new additions including:
There have also been many bug fixes and improvements to the CI and development processes.
on delete and on update clause for create table constraints #2076 @kayman-mkdeclare and set statements for bigquery dialect #2038 @KulykDmytronoqa enhancement: Enable glob rule matching for inline comments #2002 @jpy-git.sqlfluff enhancement: Rule globs #1972 @jpy-gitOne of the biggest new features in this release is the support for SQLAlchemy and other "placeholder" templating within SQL queries. Check out the doc
One of the biggest new features in this release is the support for SQLAlchemy and other "placeholder" templating within SQL queries. Check out the documentation on how to set it up.
This release also adds seven new rules. Get some help with your leading whitespace, semi-colon placement, inconsistent column references in GROUP BY/ORDER BY, and getting rid of RIGHT JOIN's among other useful lints with our new rules! See our rules documentation for more details.
On top of those, we have made loads of grammar improvements across many dialects, improvements to the dbt templater (including issues where sqlfluff fix would corrupt the code :scream:), more fix routines, and lots more improvements.
exclude_rules option for the Simple API #1850 @tunethewebskip_install to static analysis sections of tox.ini #1851 @jpy-gitrequirements_dev.txt to requirements.txt #1956 @jpy-gitFixes missing dependency issue with 0.8.0 for tqdm, plus add a test to ensure this does not happen again.
Fixes missing dependency issue with 0.8.0 for tqdm, plus add a test to ensure this does not happen again.
This release brings an improvement to the performance of the parser, a rebuild of the Jinja Templater, and a progress bar for the CLI. Lots of dialect
This release brings an improvement to the performance of the parser, a rebuild of the Jinja Templater, and a progress bar for the CLI. Lots of dialect improvements have also been done. Full list of changes below:
Highlights of this release contains a lot of T-SQL dialect improvements (shout out to @jpers36 for most of these!). We also added Spark3 as a new dial
Highlights of this release contains a lot of T-SQL dialect improvements (shout out to @jpers36 for most of these!). We also added Spark3 as a new dialect thanks to @R7L208. The complete list of changes are shown below.
This release extracts the dbt templater to a seperately installable plugin sqlfluff-templater-dbt. For users who take advantage of the dbt templater s
BREAKING CHANGE
This release extracts the dbt templater to a seperately installable plugin sqlfluff-templater-dbt. For users who take advantage of the dbt templater see the updated docs on how to migrate. It also adds the redshift dialect and removes the exasol_fs dialect which has been merged into the exasol dialect.
SET statement #1604 @wong-codaioFix the next github action (#1605) @alanmcruickshank
SET statement (#1604) @wong-codaioNothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →