Highlights
Major changes include:
- Dropping support of DBT < 0.20 ** BREAKING CHANGE **
sqlfluff fix
no will no longer fix SQL containing parsing or templating errors ** BREAKING CHANGE **- New rule L062 to allow blocking of list of configurable words (e.g. syntax, or schemas, or tables you do not want people to use)
- Lots and lots of docs improvements
- Looser requirements for
click
python package
What’s Changed
- L046: Detect Jinja spacing issues where segment begins with literal content (#2603) @barrywhart
- MySQL Add BINARY support (#2602) @tunetheweb
- Support indenting WINDOWS clauses and (optionally) CTEs (#2601) @tunetheweb
- Postgres: Support expressions in arrays (#2599) @tunetheweb
- BigQuery support Array of Structs (#2598) @tunetheweb
- Support wildcards in triggers (#2597) @tunetheweb
- Support CTEs in CREATE VIEW statements (#2596) @tunetheweb
- SQLite Support more CREATE TRIGGER options (#2594) @tunetheweb
- Snowflake: Support Column Comments in Alter Table statements (#2593) @tunetheweb
- Redshift: Add DATETIME as reserved keyword (#2591) @tunetheweb
- Support LIMIT and ORDER BY clauses in Values clauses (#2590) @tunetheweb
- L016: New option "ignore_comment_clause" to ignore column COMMENTs, etc. (#2589) @barrywhart
- Bug fix: L016 ("Line is too long") should consider length of prior fixes (#2587) @barrywhart
- Add mysql INSERT ON DUPLICATE KEY (#2494) @rpr-ableton
- Snowflake ALTER TABLE: Add multiple columns (#2578) @erevear
- MySQL: UNIQUE KEY in CREATE TABLE (#2525) @jpy-git
- Spark3:
JOIN
clause enhancements (#2570) @R7L208 - Bug fix: L003 should fix indentation for templated code (#2580) @barrywhart
- Exasol: Improve
COMMENT
andWITH [NO] DATA
clause usage. (#2583) @sti0 - Exasol: Allow multiple
LOCAL
keywords inWHERE
clause (#2582) @sti0 - Exasol: Allow
LOCAL
keyword withinPREFERRING
clause (#2579) @sti0 - Add/Improve docs for config settings: "ignore", "ignore_templated_areas" (#2574) @barrywhart
- Look for .sqlfluffignore in current directory (#2573) @barrywhart
- Snowflake: L054 should ignore "WITHIN GROUP" clauses (#2571) @barrywhart
- Redshift: Support Redshift SUPER Data Types (#2564) @PLBMR
- Capitalization rules (L010, L014, L030, L040) should ignore templated code (#2566) @barrywhart
- TSQL: Add Frame clause unreserved keywords (#2562) @jpers36
- Simple API: Fix bug where omitted parameters still override .sqlfluff (#2563) @barrywhart
- Spark3: Add Direct File Query (#2553) @R7L208
- Redshift dialect: replace AnyNumberOf with AnySetOf where it makes sense (#2561) @rpr-ableton
- jinja and dbt templaters: More robust handling of whitespace control (#2559) @barrywhart
- Improve how "sqlfluff fix" handles templating and parse errors (#2546) @barrywhart
- Jinja and dbt templater: Fix "list index out of range" error (#2555) @barrywhart
- Fix typo in sqlfluffignore docs (#2551) @tunetheweb
- Correct parsing for BigQuery
SELECT REPLACE
clauses. (#2550) @elyobo - Rules documentation improvements (#2542) @tunetheweb
- Remove requirement for Click>=8 (#2547) @tunetheweb
- Allow L059 to be configured to always prefer quoted identifiers (#2537) @niconoe-
- Adds new rule L062 to allow blocking of certain words (#2540) @tunetheweb
- Update to latest Black, drop support for dbt < 0.20 (#2536) @barrywhart
- dbt templater: Fix bug where profile wasn't found if DBT_PROFILES_DIR contained uppercase letters (#2539) @barrywhart
- Spark3: Added segments & grammar needed for hints (#2528) @R7L208
- Spark3: parse some VALUES clauses (#2245) @mcannamela
- TSQL: Allow multiple params in SET statements (#2535) @tunetheweb
- TSQL: Add indentation for SET statement (#2531) @jpers36
- Add additional documentation on dbt-adapter in pre-commit (#2530) @robertdefilippi
- TSQL: Add indentation for UPDATE statement (#2532) @jpers36
- Fix Snowflake Unordered Select Clause (#2529) @tunetheweb
- Fix Quoted Literals for Postgres and Redshift affecting rule L039 (#2526) @tunetheweb
- Postgres specific CTEDefinitionSegment (#2524) @jpy-git