Highlights
We are pleased to include 110 improvements and fixes in this release, and welcome 7 new contributors to the code.
Major changes include:
- Initial Oracle support (note: SQL, but not PL/SQL)
- Fix more dbt 1.0.0 connection issues
- Improved configuration documentation
- New rule (L059) to flag unnecessary quoted identifiers
- New rule (L060) to prefer
COALESCEinstead ofIFNULLorNVL - New rule (L061) to prefer
!=over<> - Many rule fixes
- Many dialect improvements
What’s Changed
- Prepare version 0.9.2 (#2403) @tunetheweb
- Add Postgres DROP PROCEDURE support (#2446) @rpr-ableton
- MySQL Alter table ADD/DROP/RENAME INDEX support (#2443) @tunetheweb
- Add basic CREATE PROCEDURE support to Postgres (#2441) @tunetheweb
- Indent T-SQL DECLARE and EXEC statements (#2439) @tunetheweb
- Hive alternative types: INTEGER, DEC, NUMERIC (#2438) @tunetheweb
- Implement Snowflake Dateparts (#2437) @tunetheweb
- Fix rule L028 for T-SQL for params (#2442) @tunetheweb
- Support CREATE UNIQUE INDEX (#2440) @tunetheweb
- Make BigQuery typeless STRUCTs Expressions (#2435) @tunetheweb
- T-SQL support default params and no RETURN value (#2434) @tunetheweb
- "sqlfluff fix" should report any parse errors found (#2423) @barrywhart
- Redshift VACUUM support (#2433) @rpr-ableton
- Add Oracle PROMPT statement (#2413) @r0fls
- Spark3: Support for
INSERT OVERWRITE DIRECTORYwith Hive Format (#2389) @R7L208 - Exasol: Fix escaped identifiers (#2431) @sti0
- Exasol: Fix
LOCAL.ALIASSyntax (#2430) @sti0 - Exasol: Allow quoted identifier for various statements. (#2428) @sti0
- Misc grammar improvements for Snowflake (#2421) @chwiese
- New rule L061 to use != over <> (#2409) @sti0
- Correct TRANS to TRAN (#2425) @fdw
- Remove the "heuristic" slicer, as it was replaced by JinjaTracer (#2422) @barrywhart
- L060: More specific description (#2419) @jpy-git
- Fix code formatting in Rule docs (#2418) @tunetheweb
- Allow UPDATE SET statements in RedShift (#2417) @tunetheweb
- Add Redshift cursor DECLARE, FETCH & CLOSE support (#2414) @rpr-ableton
- Add Redshift ANALYZE COMPRESSION support (#2412) @rpr-ableton
- ANSI Values statement fixes (#2404) @jpy-git
- Exasol: Overhaul drop statements (#2407) @sti0
- L044, L045: Handle Exasol VALUES clause (#2400) @barrywhart
- L060: Use COALESCE instead of IFNULL or NVL. (#2405) @jpy-git
- Postgres: Fix Values alias regression (#2401) @jpy-git
- Align line length in Python code to 88 characters (#2264) @chwiese
- Jinja templater: Allow "load_macros_from_path" to be a comma-separated list of paths (#2387) @barrywhart
- Add "TRANS" keyword for TSQL (#2399) @fdw
- Docstrings: Replace double backtics with single quote for lint results. (#2386) @jpy-git
- Spark3: Support for
INSERT OVERWRITE DIRECTORYstatements (#2385) @R7L208 - Fix unnecessary white underline in doc site (#2383) @tunetheweb
- Rolls back some code cleanup that caused coverage report to show gaps (#2384) @barrywhart
- Fix "connection already closed" issue with dbt 1.0 and dbt_utils (#2382) @barrywhart
- Spark3: Support for
INSERT [TABLE]data manipulation statements (#2290) @R7L208 - Comment out line in bug report template (#2378) @jpy-git
- Postgres: EXPLAIN statement updates (#2374) @jpy-git
- Make TABLE a non-reserved word in Postgres (#2377) @tunetheweb
- Snowflake COLUMN is not a reserved word (#2376) @tunetheweb
- TSQL: Complete ASA Table Index Clause functionality (#2373) @jpers36
- Add support for Jinja import and include (#2355) @barrywhart
- Add Redshift INTERVAL datatype support (#2366) @rpr-ableton
- Whitespace concatenated string literals for MySQL, Postgres and Redshift (#2356) @jpy-git
- Fix L026 false positive on "SELECT INTO" statement (#2371) @barrywhart
- Exclude EMIT clauses from rule L013 (#2364) @tunetheweb
- Functional API: Segments.recursive_crawl (#2369) @jpy-git
- Complete Redshift CREATE EXTERNAL TABLE support (#2354) @rpr-ableton
- L041: Fix duplicate DISTINCT corruption (#2365) @jpy-git
- Bigquery Create View with Options (#2359) @tunetheweb
- L026: Handle DML statements and multiple levels of nesting (#2336) @barrywhart
- Postgres & MySQL: cleanup AliasExpressionSegment (#2353) @jpy-git
- Redefine MySQL Interval segment (#2351) @rpr-ableton
- Postgres: INSERT INTO table alias (#2349) @jpy-git
- L043: Remove redundant CASE statement replacing NULLS with NULLS (#2346) @jpy-git
- Add RedShift DATASHARE support (#2350) @rpr-ableton
- Various documentation updates (#2347) @tunetheweb
- Snowflake ALTER TABLE: Drop multiple columns (#2348) @jpy-git
- Configuration doc: add rule configuration section (#2291) @juhoautio
- Redshift: create model, show model & data types (#2338) @rpr-ableton
- L059: Unnecessary quoted identifier (#2341) @jpy-git
- L043: Use simple replace to apply fixes (#2343) @jpy-git
- TSQL: Add functionality to PARTITION BY clause (#2335) @jpers36
- L039 casting operator postgres fix (#2334) @jpy-git
AnySetOfgrammar (#2326) @jpy-git- Redshift: update CREATE TABLE AS match_grammar (#2333) @rpr-ableton
- Redshift CREATE EXTERNAL TABLE: TABLE PROPERTIES (#2330) @jpy-git
- Snowflake: Flush out
ALTER TABLE'stableColumnActiongrammar (#2332) @wong-codaio - Snowflake ALTER TABLE: Add clusteringAction (#2329) @jpy-git
- Snowflake ALTER TABLE: Add searchOptimizationAction (#2328) @jpy-git
- Fix numeric literal grammar for Postgres/MySQL/Exasol (#2324) @jpy-git
- L039: Remove spaces between comparison operators (T-SQL) (#2325) @jpy-git
- Enable setting a target of a dbt profile (#2236) @yu-iskw
- Snowflake: Add support for column rename (#2327) @wong-codaio
- Snowflake: Added
AlterTableStatementspecific for Snowflake (#2267) @wong-codaio - Full REFERENCES grammar for CREATE TABLE statement (#2315) @jpy-git
- Fix Spark numeric literals (#2317) @jpy-git
- Change type of Snowflake stage paths to fix issues with L044 (#2320) @chwiese
- Add Bytes Quoted Literals to Spark dialect (#2312) @jpy-git
- Fix L044 assertion failure with delete stmt & cte (#2321) @barrywhart
- L003 should consider only literal leading whitespace (ignore templated) (#2304) @barrywhart
- Redshift: update reserved keywords (#2318) @rpr-ableton
- docs: Document how to run SQLFluff with local changes to test them (#2316) @kayman-mk
- Update redshift unreserved keywords (#2310) @jpy-git
- Fix spark and hive quoted literals (#2311) @jpy-git
- Oracle Dialect (#2293) @r0fls
- Redshift dialect: add COPY and UNLOAD statements (#2307) @rpr-ableton
- L052: Fix case where no preceding segments and mulitline (#2279) @jpy-git
- Update rule L049 to handle EXEC assignments (#2308) @tunetheweb
- Remove DATE, DATETIME and TIME from BigQuery DatePart (#2283) @tunetheweb
- Fix #1292: nocolor and verbose can work in config files (#2300) @cympfh
- Allow pyproject.toml as extra_config_path (#2305) @jpy-git
- L009: Handle adding newline after trailing templated code (#2298) @barrywhart
- added missing "t" in doc for Rule_L020 (#2294) @Xilorole
- docs: Document configuration keyword for rule L054 (#2288) @tomasfarias
- Update L009 to operate in raw, not templated space (#2285) @barrywhart
- Redshift CREATE LIBRARY statements (#2277) @rpr-ableton
- L025 with 'bigquery' dialect: Correctly interpret calling functions with a table as a parameter (#2278) @barrywhart
- Spark3: Coverage for
REFRESHauxiliary statements (#2282) @R7L208 - Spark3: Coverage for
USE DATABASEstatement. (#2276) @R7L208 - Fix link for editing 'In The Wild' page with new base branch,
main(#2280) @barnett - Optionally allow additional configurable characters in L057 (#2274) @tunetheweb
- L025 should look at subqueries (#2273) @barrywhart
- Add coverage for
TRUNCATEstatement in Spark3 dialect (#2272) @R7L208 - Upgrade
clickversion to 8.0+ to supportclick.shell_completion(#2271) @wong-codaio - Improve release checklist to make releases easier (#2263) @tunetheweb