NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1325 most downloaded on PyPI
The SQL Linter for Humans
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
8 years old
157 releases · first in 2018
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 @alanmcruickshankOne column per quarter.
This 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
Nothing published for this version
Nothing published for this version
Another dbt bugfix from 0.6.7 and 0.6.8, plus a host of dialect and syntax improvements.
Another dbt bugfix from 0.6.7 and 0.6.8, plus a host of dialect and syntax improvements.
CONCURRENTLY and FINALIZE keywords to DETACH PARTITION (#1529) @kevinmarshlint_templated_tokens as no longer does anything (#1570) @tunethewebFixed a DBT bug introduced in 0.6.7 - apologies!
Fixed a DBT bug introduced in 0.6.7 - apologies!
Lots of fixes to our rules (particularly when running sqlfluff fix, and particularly for Jinja and DBT templates). We also have good improvements to E
Lots of fixes to our rules (particularly when running sqlfluff fix, and particularly for Jinja and DBT templates). We also have good improvements to Exasol, Snowflake, and T-SQL dialects amongst others. Plus we added Hive and SQLite as supported dialects!
REORGANIZE statement (#1509) @sti0ISNULL and NOTNULL keywords (#1483) @leamingradCREATE TABLE in-/outline constraint / Adjusted DISTRIBUTE/PARTITION clause (#1491) @sti0AT TIME ZONE (#1485) @leamingradFixed some of our autofix rules where running fix sometimes made unintended changes. Added config to rules L011 and L012 to allow preferring implicit
Fixed some of our autofix rules where running fix sometimes made unintended changes. Added config to rules L011 and L012 to allow preferring implicit aliasing. Also further improved our Postgres support and documentation.
This release includes initial support of Transact-SQL (T-SQL), much better Postgres and Snowflake support, improvements to our documentation, 100% cov
This release includes initial support of Transact-SQL (T-SQL), much better Postgres and Snowflake support, improvements to our documentation, 100% coverage for Python code (with a small number of accepted exceptions), along with numerous other bug fixes and improvements.
Many thanks to all the contributors helping to improve SQLFluff!
Added support for empty WINDOWS specificiations (#1293) @matthieucan
Support for primary index name, collect stats improvement, COMMENT statement for teradata dialect #1232
--nocolor command-line option should suppress emoji output (https://github.com/sqlfluff/sqlfluff/issues/1246)This is mostly a bugfix release to support dbt 0.20.* within the templater.
This is mostly a bugfix release to support dbt 0.20.* within the templater.
Linting output now supports GitHub Actions #1190
This release introduces a new --processes (-p) argument on lint and fix commands. Setting it to a value greater than 1 will result in parallel process
This release introduces a new --processes (-p) argument on lint and fix commands. Setting it to a value greater than 1 will result in parallel processing and greater operating speed. The optimal value will depend on the device, so please experiment and report your findings!
Example:
sqlfluff lint models -p 4
Will lint the models directory using 4 parallel processes.
The release also includes a wealth of additional statement parsing compatibility and bug fixes. Thank you to everyone who contributed!
--processes (-p) CLI argument--include-metas option for parse output to show the meta
segments in the parse tree.&, |, ^, <<, >>select as struct '1' as bb, 2 as aa syntax.Delimited grammars which otherwise don't allow gaps. This is facilitated through an optional argument to trim_non_code_segments.STRUCT.sqlfluff.parse) which now raises an exception which holds all potential parsing issues and prints nicely with more than one issue.This resolves some early issues with parallel linting and the dbt templater. The intent of this pre-release is to trial this functionality more extens
This resolves some early issues with parallel linting and the dbt templater. The intent of this pre-release is to trial this functionality more extensively before a full release.
sqlfluff.parse) which now raises an exception which holds all potential parsing issues and prints nicely with more than one issue.sqlfluff.parse)
which now raises an exception which holds all potential parsing issues
and prints nicely with more than one issue.Following a significant rework of the parser, a new milestone has been reached in linting and fixing speed - the processes can now run in parallel. To
Following a significant rework of the parser, a new milestone has been reached in linting and fixing speed - the processes can now run in parallel. To take advantage of the new feature, use the --parallel CLI argument followed by the number of threads.
For example:
sqlfluff lint --parallel 4
will recursively lint the current directory (as before), but with 4 running processes simultaneously. We're releasing this in alpha initially so that the feature can be tested thoroughly before rolling out a stable release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →