Highlights
- Fix dbt 1.0.0 connection issue
- Fix some SQL corruption issues with templated code
- New components to simplify creating rules
- Remove support for Python 3.6
What's Changed
- Fix delimited identifier parsing for spark3 #2111 @mcannamela
- Stop numeric literal from splitting valid naked identifiers. #2114 @jpy-git
- Grammar: Add CREATE USER/GROUP statement to Redshift dialect #2115 @jpy-git
- Fix mypy type raise in L003 #2127 @barrywhart
- Add ability to parse multiple GO/semicolon delimiters #2124 @jpy-git
- Allowed array/struct values in
default
definition ofdeclare
#2120 @KulykDmytro - Normalise input newlines #2128 @jpy-git
- Clean up all files using the pre-commit hook #2123 @kayman-mk
- Refined LintFix API #2133 @jpy-git
- Hotfix for LintFix comparisons #2138 @jpy-git
- Lint spaces in qualified names #2130 @jpers36
- Remove support for Python 3.6 (it's "end of life" December 23, 2021) #2141 @barrywhart
- Fully remove python3.6 references #2142 @jpy-git
- Fix L022 to not flag CTE column definitions #2139 @jpy-git
- docs: set
dbt_modules
todbt_packages
#2143 @ciklista - Hive: add INTERVAL syntax #2144 @juhoautio
- Fix mypy error on python 3.7 #2147 @juhoautio
- Update PR template to reference tox generate-fixture-yml command #2148 @jpy-git
- Update index.rst notable changes with 0.9.0 details #2132 @jpy-git
- Add ALTER USER and ALTER GROUP to redshift dialect #2131 @jpy-git
- Add complete DESCRIBE grammar to Snowflake dialect #2149 @jpy-git
- Fix bug with BigQuery UNPIVOT #2156 @tunetheweb
- Make L057 compatible with BigQuery #2151 @tunetheweb
- TSQL: Proper Indentation of ELSE IF #2157 @jpers36
- Linter Test Name Duplication #2158 @jpers36
- Add struct support for
hive
andredshift
(L026, L028) #2154 @KulykDmytro - Postgres - Support functions prepended with _ and containing $ #2159 @jpy-git
- TSQL: function parsing/linting #2155 @jpers36
- TSQL: Add THROW statement #2163 @jpers36
- Add yamllint to project #2162 @tunetheweb
- Fix outdated docstring in dialects_test #2166 @juhoautio
- Minor comment fixes #2179 @juhoautio
- L010 to apply to date_part (capitalization policy for time units) #2167 @juhoautio
- ALTER GROUP fix to accommodate quoted objects #2188 @tdstark
- Lexer: add non-breaking spaces to whitespace #2189 @jpers36
- Grammar: Add COMMENT statement to Snowflake #2173 @jpy-git
- Grammar: Add DISCARD statement to Postgres dialect #2175 @jpy-git
- Grammar: Add UNDROP statement to Snowflake dialect #2177 @jpy-git
- Grammar: Add UNSET statement to Snowflake dialect #2181 @jpy-git
- Grammar: Add RESET statement to Postgres dialect #2182 @jpy-git
- Grammar: Add LOAD statement to Postgres dialect #2183 @jpy-git
- Grammar: Fix TRUNCATE statement in Snowflake dialect #2184 @jpy-git
- Grammar: Add HELP statement to MySQL dialect #2191 @jpy-git
- Grammar: Add PURGE BINARY LOGS statement to MySQL dialect #2193 @jpy-git
- Grammar: Add RESET MASTER statement to MySQL dialect #2194 @jpy-git
- Grammar: Add RENAME TABLE statement to MySQL dialect #2195 @jpy-git
- Grammar: Tidy up transaction statements in Snowflake dialect #2196 @jpy-git
- Modifying Redshift USER/GROUP Statements To Use
ObjectReferenceSegment
#2190 @tdstark - Grammar: Fix TRUNCATE statement in Postgres dialect #2185 @jpy-git
- Grammar: Add LISTEN, NOTIFY, and UNLISTEN statements to Postgres dialect #2174 @jpy-git
- Grammar: Tidy up Snowflake/MySQL/HIVE USE statements #2187 @jpy-git
- Make Snowflake keywords unreserved: account, organization, pivot #2172 @jpy-git
- Grammar: Add SET sql_log_bin statement to MySQL dialect #2192 @jpy-git
- Grammar: Add CALL statement to Snowflake dialect #2176 @jpy-git
- L027 Fix self referring column alias edge case #2171 @jpy-git
- TSQL: Remove dependency on ANSI keyword lists #2170 @jpers36
- Grammar: Add Table Maintenance Statements to MySQL dialect #2198 @jpy-git
- Adding CREATE TABLE AS to Redshift #2205 @tdstark
- TSQL: Add support for ALTER TABLE ALTER COLUMN #2208 @jpers36
- Remove oyaml in favour of pyyaml #2210 @jpy-git
- Support Spark
CREATE TABLE LIKE
syntax #2207 @R7L208 - Add override for linguist to include SQL in language statistics #2214 @jpy-git
- Add type stubs for appdirs and colorama to improve mypy coverage #2211 @jpy-git
- Remove cached-property in favour of stdlib functools implementation #2212 @jpy-git
- Restructure CASE segment (extract WHEN and ELSE into their own segment types) #2213 @barrywhart
- Add types-regex package for type checking #2216 @jpy-git
- Snowflake: Split out
CREATE VIEW
into its own segment #2217 @wong-codaio - Grammar: Fix multi-character comparison operators #2197 @jpy-git
- Snowflake: Support TOP N select clause modifier #2222 @wong-codaio
- Fix CLI arguments to allow for autocompletion #2218 @jpy-git
- Simplify rule creation by adding a functional API to RuleContext #2126 @barrywhart
- Simplify nested cases #2223 @barrywhart
- Reword lint message for L058 per review #2226 @barrywhart
- Update BaseRule.discard_unsafe_fixes() to avoid touching templated code #2220 @barrywhart
- Add L059 - Capitalization on Data Types #2227 @tdstark
- TSQL: Table valued functions #2233 @jpers36
- Don't allow fixes to COPY code from templated regions #2231 @barrywhart
- Fix several small issues with rule docs #2234 @barrywhart
- postgres: Add datatypes #2121 @kayman-mk
- Combine L059 and L010 #2238 @tdstark
- Fix L044 assertion failure: "SELECT *" with no "FROM" clause #2239 @barrywhart
- Docs: Make Specific Rules docstring more user friendly #2241 @jpy-git
- Fix a bug handling Jinja "{% set %}" blocks with a templated block inside #2240 @barrywhart
- Redshift lint create external table statements #2229 @tinder-albertyue
- Update tox.ini for best practices #2243 @jpy-git
- Docs: Make code blocks consistent #2242 @jpy-git
- Add support for nested Jinja macros #2246 @barrywhart
- Support
DROP
DDL statements for Spark3 #2215 @R7L208 - Docker Compose environment for SQLFluff developers #2254 @barrywhart
- TSQL: Add OFFSET unreserved keyword #2258 @jpers36
- Fix connection issue in dbt 1.0.0 #2230 @NiallRees
- Redshift CREATE SCHEMA statements #2252 @rpr-ableton
- Enhance Snowflake COPY INTO #2250 @chwiese
- Coverage for 'REPAIR' Statements for Hive & Spark3 dialect #2256 @R7L208