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.
Highlights
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:
- A reorganisation of rules. All rules have been recoded, and can now be referred to by their name, code, alias or group. The legacy code for the rule is included as an alias for each rule to support some backward compatibility.
- Configuration files (and inline configuration flags), should now use the name of the rule rather than the code. Any configuration files which reference using legacy rules (or reference unknown rules) should now display warnings.
- Introduces the the
sqlfluff format
CLI command (a lasqlfmt
orblack
) to auto-format sql files using a known set of fairly safe set of rules. - Databricks as a distinct new dialect (rather than as previously an alias for
sparksql
).
There are also numerous dialect improvements to ANSI, Athena, TSQL, Teradata, SQLite & MySQL.
What’s Changed
- Fix #4367 #4479 @alanmcruickshank
- Teradata: Improve COLLECT STATS parsing #4478 @dflem97
- Add a sqlfluff format CLI command #4473 @alanmcruickshank
- Recode and disable L031 -> AL07 #4471 @alanmcruickshank
- Named Config (part 2) #4470 @alanmcruickshank
- Rule config lookup improvements & config warnings #4465 @alanmcruickshank
- Recode L050 #4468 @alanmcruickshank
- Implicit indent fixes #4467 #4469 @alanmcruickshank
- ANSI: Add IfExistsGrammar to DropTrigger #4466 @WittierDinosaur
- Rules Reorg Mopup #4462 @alanmcruickshank
- Layout Rules Recode (part 2) #4456 @alanmcruickshank
- fix(athena): resolve errors parsing around maps, structs, and arrays #4391 @timcosta
- Layout Rules Recode (part 1) #4432 @alanmcruickshank
- TSQL: EXEC string literal #4458 @jpers36
- Teradata: Added SET QUERY_BAND statement #4459 @dflem97
- Teradata: Added TOP select clause modifier #4461 @dflem97
- Teradata: Addition of comparison operator extensions #4451 @dflem97
- Add extensions and plugin section to the README.md #4454 @jared-rimmer
- Convention rules bundle #4448 @alanmcruickshank
- References rule bundle #4446 @alanmcruickshank
- Structure and Ambiguous rule bundles #4444 @alanmcruickshank
- TSQL: Bare functions #4439 @jpers36
- Pull dbt CI tests forward to 1.1 and 1.4 #4442 @WittierDinosaur
- Teradata: Added "AND STATS" options when creating table #4440 @dflem97
- Add Databricks as a distinct dialect #4438 @WittierDinosaur
- Remove importlib deprecated methods #4437 @alanmcruickshank
- SQLite: Support PRAGMA statements #4431 @WittierDinosaur
- Proposed graceful handling of noqa by L016 (#4248) #4424 @alanmcruickshank
- DuckDb: Allow quoted literals as identifiers #4410 @WittierDinosaur
- SQLite Refactor to reduce statement and keyword scope #4409 @WittierDinosaur
- L046 and L056 recode #4430 @alanmcruickshank
- Recode Aliasing Rules #4427 @alanmcruickshank
- Adjust MySQL dialect to support combination of not-null, default and … #4426 @FabianScheidt
- Revert some changes to tox #4428 @alanmcruickshank
- Migrate capitalisation rules to plugin and recode #4413 @alanmcruickshank