NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1209 most downloaded on PyPI
The SQL Linter for Humans
Last release 2 days ago
02 Oct 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
158 releases · first in 2018
A 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 @PhilippLangeOne column per quarter.
Changes 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.
Bugfix release for an issue in L016 introduced in 0.5.4.
L016 introduced in 0.5.4.L016 issue where DISTINCT keywords were mangled during fixing #1024.This release is entirely for a bugfix for an off-by-one error introduced in L016 as part of 0.5.4.
This release is entirely for a bugfix for an off-by-one error introduced in L016 as part of 0.5.4.
0.5.4.This release brings a few bug fixes and parsing tweeks but the main changes are underlying refactors and simplifications to support future development
This release brings a few bug fixes and parsing tweeks but the main changes are underlying refactors and simplifications to support future development.
`L009` can now be enforced when templater = dbt.
L009 can now be enforced when templater = dbt.EXPLAIN, USE statements.ALTER TABLE x RENAME TO y syntax.ALTER SESSION in snowflake.templater = dbt L009 bug #861 where:
sqlfluff lint would incorrectly always return L009 | Files must end with a trailing newline.sqlfluff fix would remove trailing newlines when exclude_rules = L009.sqlfluff dialects is now sorted.dbt models.Bugfix release for several rules.
Bugfix release for several rules.
This release is mainly to fix a recursion bug in L044
This release is mainly to fix a recursion bug in L044
Other changes:
UNION) and how they interact with ORDER BY clauses.~.SAMPLE syntax.SPACE keyword now has no special meaning in the postgres dialect.UNION) and how they interact with
ORDER BY clauses.~.SAMPLE syntax.SPACE keyword now has no special meaning in the postgres dialect.This release includes a couple of breaking changes to configuration and API methods. Specifically:
This release includes a couple of breaking changes to configuration and API methods. Specifically:
sqlfluff.rules() to sqlfluff.list_rules() and sqlfluff.dialects() to sqlfluff.list_dialects() due to naming conflicts with the now separate sqlfluff.dialects module.capitalisation_policy to extended_capitalisation_policy for L014 to reflect the fact that it now accepts more options (pascal) than regular capitalisation_policy still used by L010 and others.only_aliases config with unquoted_identifiers_policy and added it to rule L014 in addition to L029.pascal (PascalCase) capitalisation_policy option for L014 (unquoted identifiers)only_aliases configuration option for L014 (unquoted identifers)get_segment and get_grammar can be used on unexpanded grammars to access elements of the parent grammars. The copy method on grammars can be used to copy with alterations.sqlfluff.core module so that each dialect is better isolated from each other. This also allows more focused testing and the potential for dialect plugins in future. Dialects are now only imported as needed at runtime. All dialects should now be accessed using the selector methods in sqlfluff.core.dialects rather than importing from sqlfluff.dialects directly.ALTER USER commands in Snowflake dialect.FROM clauses to better represent nested joins and table functions.This is a minor release with parsing coverage improvements, introduction of custom rule configuration, and more API methods.
This is a minor release with parsing coverage improvements, introduction of custom rule configuration, and more API methods.
sqlfluff:templater:jinja:load_macros_from_path.NULL keywords, so parse as Literals where
appropriate.This is a huge major release, which wouldn't have been possible without a massive number of contributors. 🎉 🎉. In particular thanks to everyone who te
This is a huge major release, which wouldn't have been possible without a massive number of contributors. 🎉 🎉. In particular thanks to everyone who tested the alpha versions of this release in the wild.
Major new functionality includes:
import sqlfluff and use the main functionality within other python projects. See examples for more details.dbt templating engine which can use the compiler from dbt directly all allow access to all of the macros within a project.Alongside these big changes, there are a whole host of parser improvements for all dialects and a set of new linting rules and configuration options.
For full details of the changes, check out the changelog.
sqlfluff as a python module
and call parse, lint and fix within their own projects. See
the docs for more
information. (#501)dbt as a templating engine directly allowing
richer and more accurate linting around dbt macros (and packages
related to dbt). For more info see the docs. (#508)%) operator. (#447).is_type() method on segments to more intelligently
deal with type matching in rules when inheritance is at play.Linter directly using user_rules.{{ variables }}, {# comments #} and
{% loops %} (in jinja) now have placeholders in the parsed
structure. Rule L003 (indentation), also now respects these
placeholders so that their indentation is linted accordingly.
For loop or block tags, they also generate an Indent and
Dedent tag accordingly (which can be enabled or disabled)
with a configuration value so that indentation around these
functions can be linted accordingly. (#541)-- sqlfluff:. (#541)--noqa: use in rules. (#552)pre-commit hooks for lint and fix. (#576)FROM/JOIN clauses" from the dbt coding conventions. (#473, #479)USING" from the dbt coding conventions. (#487)UNION ALL to UNION *" from the dbt coding conventions. (#489)dbt coding conventions. (#495)black coding style. (#485)EPOCH keyword for postgres dialect. (#522)USE statement to the snowflake dialect. (#537)CODE_OF_CONDUCT to the project. (#471)ISNULL and NOTNULL keywords to ansi dialect. (#441)requirements_dev.txt for local testing/linting. (#500)--disregard-sqlfluffignores to allow direct linting of files in the .sqlfluffignore. (#486)dbt incremental macro. (#363)CREATE FUNCTION syntax for postgres and for bigquery. (#325)CREATE INDEX and DROP INDEX for mysql. (#740)IGNORE NULLS, RESPECT NULLS, GENERATE_DATE_ARRAY and
GENERATE_TIMESTAMP_ARRAY for bigquery. (
#667,
#527)CREATE and CREATE ... CLONE for snowflake. (#539)Linter is now decoupled from
logging so that it can be imported directly by subprojects without
needing to worry about weird output or without the log handing getting
in the way of your project. (#460)* and a.b.* expressions to have their
own expressions. Any dependencies on this structure downstream
will be broken. This also fixes the linting of both kinds of expressions
with regard to L013 and L025. (#454)EphemeralSegment to aid with parsing efficiency
without altering the end structure of the query. (#491)ObjectReference into ColumnReference and TableReference
for more useful API access to the underlying structure. (#504)KeywordSegment and the new SymbolSegment both now inherit
from _ProtoKeywordSegment which allows symbols to match in a very
similar way to keywords without later appearing with the type of
keyword. (#504)Parser class to parse a lexed query rather than
relying on users to instantiate a FileSegment directly. As a result
the FileSegment has been moved from the core parser directly into
the dialects. Users can refer to it via the get_root_segment()
method of a dialect. (#510)yml files. (#553)ESCAPE parsing in LIKE clause. (#566)BETWEEN statements. (#498)EXCEPT clause parsing. (#472)README. (#457).sqlfluff. (#452)capitalisation_policy = lower. (#477)logging warnings red. (#497)Bracketed segment now obtains its brackets directly from the dialect
using a set named bracket_pairs. This now enables better configuration
of brackets between dialects. (#325)--no-safety option has been removed, the default
is now that all enabled rules will be fixed. (#583)BaseSegment.grammar, BaseSegment._match_grammar() and
BaseSegment._parse_grammar() instead preferring references directly
to BaseSegment.match_grammar and BaseSegment.parse_grammar. (#509)EmptySegmentGrammar and replaced with better non-code handling
in the FileSegment itself. (#509)ContainsOnly grammar as it remained only as an anti-pattern. (#509)expected_string() functionality from grammars and segments (#509)
as it was poorly supported.BaseSegment.as_optional() as now this functionality happens
mostly in grammars (including Ref). (#509)ColumnExpressionSegment in favour of ColumnReference. (#512)LambdaSegment feature, instead replacing with an internal
to the grammar module called NonCodeMatcher. (#512)difflib or cdifflib, by relying on source mapping
instead to apply fixes. (#541)Add fix for Rule L004 (mixed tabs and spaces
typing_extensionsThis release partly a test of the automatic pypi publication action but also contains various bugfixes + improvements in preparation for the 0.4.0 rel
This release partly a test of the automatic pypi publication action but also contains various bugfixes + improvements in preparation for the 0.4.0 release.
Nothing published for this version
No big things in the release, but loads of smaller bugfixes and quality of life fixes. Once again, thanks to so many people who've contributed to this
No big things in the release, but loads of smaller bugfixes and quality of life fixes. Once again, thanks to so many people who've contributed to this release: @dmateusp, @sethwoodworth, @pwildenhain & @NiallRees.
sqlfluff dialects command to get a readout of available dialects [+ associated docs].IGNORE/RESPECT NULLS.current_timestamp and similar functions. Thanks @dmateusp.QUALIFY clause.*. Thanks @dmateusp.SUBSTRING.REPLACE and EXCEPT clauses.NOTNULL and ISNULL.WITH statements now parse.fix command.After a short break we're back. Great to see so many new contributors this time. Thanks do much for all your contributions!
After a short break we're back. Great to see so many new contributors this time. Thanks do much for all your contributions!
GROUP BY. Thanks @flpezet.SelectableGrammar and some related segments to make it
easier to refer to select-like things in other grammars.CASE statement parsing. Thanks @azhard.SAMPLE implementation. Thanks @rkm3.Implementation of the bigquery CREATE MODEL syntax. Thanks @barrywhart.
CREATE MODEL syntax. Thanks @barrywhart.ORDER BY x NULLS FIRST|LASTFOR keyword in bigquery SYSTEM_TIME syntax.A small release aimed primarily at changes to make it easier to roll sqlfluff out to new projects:
A small release aimed primarily at changes to make it easier to roll sqlfluff out to new projects:
Importantly:
--nofail option to parse and lint commands to assist rollout.--version option to complement the version option already available on the cli.--nofail option to parse and lint commands to assist
rollout.--version option to complement the version option already
available on the cli.ALTER TABLE.Nothing published for this version
Nothing published for this version
This is a big release, no breaking changes externally, but a lot of internal changes. Highlights include:
This is a big release, no breaking changes externally, but a lot of internal changes. Highlights include:
Lots of people have helped make this release what it is. Big thanks to @Katzmann1983, @azhard, @barrywhart.
parse command, added the --profiler and --bench options
to help debugging performance issues.do command in the jinja templater.||).my_db..my_table.INTERVAL '4 days' style interval expression.JOIN clauses..sqlfluffignore file to ignore certain paths.set
interfaces for managing and creating keywords and the Ref.keyword() method
to refer to them, and the ability to refer directly to keyword names in
most grammars using strings directly. Includes SegmentGenerator objects
to bind dialect objects at runtime from sets. Thanks @Katzmann1983!L029 for using unreserved keywords as variable names._path in the config files.DISTINCT ON () syntax for the postgres dialect.Bracketed grammar has been changed to treat its
content as a Sequence rather than a OneOf.SandboxedEnvironment rather than Environment for jinja
templating for security.Support for a.b.* on top of a.* in select target expressions.
a.b.* on top of a.* in select target expressions.This major release drops support for python 2.7 and python 3.4
This major release drops support for python 2.7 and python 3.4
Highlights:
diff-cover.Contibutors:
For full details, see the changelog.
SELECT keyword is parsed within a select statement,
so that it belongs as part of the newly renamed select_clause (renamed
from previously select_target_group).type and name properties of the BaseSegment
class and its children. name should be specific to a particular kind
of segment, and type should express a wider group. Handling of the
newline, whitespace and comma segments has been updated so that
we use the type property for most use cases rather than name.Indent and Dedent segments
used for indicating the position of theoretical indents in the structure.
Several helper functions have been added across the codebase to handle
this increase in the kinds of segments which might be encountered by
various grammars.fix phase of this
rule, there is enough logic to try and reconstruct a sensible place for
line breaks as re-flow the query. This will likely need further work
and may still encounter places where it doesn't fix all errors but should
be able to deal with the majority of simple cases.COMMIT, DROP, GRANT, REVOKE
and ROLLBACK. Thanks @barrywhart.--format option to the parse command that allows a yaml output. This
is mostly to make test writing easier in the development process but
might also be useful for other things.UNION.diff-cover tool. Thanks @barrywhart.fix command while using stdin. Thanks @nolanbconaway.DISTINCT. Thanks @barrywhart.source macro from dbt. Thanks @DandandanL017 to catch this.ignore parameter on linting and fixing commands to ignore
particular kinds of violations.A --code-only option to the parse command to spit out a more simplified output with only the code elements.
--code-only option to the parse command to spit out a more
simplified output with only the code elements.LintingResult.setup.py install_requires section.IN/NOT IN and IS/IS NOT.Bugfix, default config not included.
Tweek rule L005 to report more sensibly with newlines.
This is the first *Alpha* release of sqlfluff. Thanks especially to @mrshu @barrywhart & @nolanbconaway who have helped get the tool to this stage.
This is the first Alpha release of sqlfluff. Thanks especially to @mrshu @barrywhart & @nolanbconaway who have helped get the tool to this stage.
Version 0.2.1 mainly brings templating ability to sqlfluff. For a full treatment of why that's a great thing, check out one of the pages in the new docs, about how sql is used in the real world analytics stack. The short version of what's new in this release is:
format(). The fix command also works sensitively around templated sections so as not to destroy the templating.Templating support (jinja2, python or raw).
fix command is also sensitive to fixing over templates
and will skip certain fixes if it feels that it's conflicted.:: operator.GROUP BYand LIMIT.ORDER BY using indexes and expressions.CASE statements.RuleSet class which now
holds the filtering code.with clause.Bracketed grammar to optionally match empty brackets using
the optional keyword.Moved some of the responsibility for formatted logging into the linter to mean that we can log progressively in large directories.
Lots of changes since the first release of 0.1.*. The grammar is starting to look sensible and we have mostly parity with the original sqlfluff from 0
Lots of changes since the first release of 0.1.. The grammar is starting to look sensible and we have mostly parity with the original sqlfluff from 0.0..
--exclude-rules argument to most of the commands to allow rule users
to exclude specific subset of rules, by @sumitkumar1209!=, ~ and ::.LambdaSegment which allows matching based on arbitrary
functions which can be applied to segments.Anything grammar, useful in matching rather than in parsing to match anything.BaseGrammar class to support common matching features across multiple grammars.
In particular this affects the Delimited grammar which is now much simpler but does
also require slightly more liberal use of terminators to match effectively.ParseContext object which contains things like the dialect and various depths. This
simplifies the parsing and matching code significantly.Bracketed grammar, which still implements it directly). This
takes out some originally duplicated code.ORDER BY clause.bracket_sensitive_forward_match method from the BaseGrammar. It was ugly
and not flexible enough. It's been replaced by a suite of methods as described above.Tweak to the L001 rule so that it doesn't crash the whole thing.
Your coding agent can read these notes before it upgrades. Set up the MCP server →