github sqlfluff/sqlfluff 0.6.0
SQLFluff 0.6.0

latest releases: 3.0.5, 3.0.4, 3.0.3...
2 years ago

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!

Added

  • Lint and fix parallelism using --processes (-p) CLI argument
  • Respect XDG base dirs on Mac OS (#889).
  • Added support for additional delimiters by creating a new DelimiterSegment in the
    ANSI dialect which defaults to the semicolon, but allows it to be more intuitive
    when overriden in a specific child dialect (mysql) #901)
  • Added support for the DELIMITER statement in the mysql dialect #901)
  • Added support for additional delimiters by creating a new DelimiterSegment in the
    ANSI dialect which defaults to the semicolon, but allows it to be more intuitive
    when overriden in a specific child dialect (mysql) #901)
  • Added support for function as a default column value #849.
  • Add an --include-metas option for parse output to show the meta
    segments in the parse tree.
  • Allow CREATE FUNCTION syntax without arguments @bolajiwahab #1063.
  • Added support for the CREATE/DROP PROCEDURE statement for the mysql dialect #901)
  • Added specific allowed/required syntaxes for CREATE/DROP FUNCTION within the mysql dialect #901)
  • Now possible to run sqlfluff commands outside the project root when using the dbt templater.
  • Add a little bit of fun on CLI exit 🎉!
  • Fix 1051, adding support for bitwise operators &, |, ^, <<, >>

Changed

  • L034 now ignores select statements which contain macros.
  • L034 now ignores select statements part of a set expression, most commonly a union.
  • Fix bug #1082, adding support for BigQuery select as struct '1' as bb, 2 as aa syntax.
  • Rationalisation of the placement of meta segments within templated queries to support more reliable indentation. This includes prioritising longer invariant sections first and then dropping any shorter ones which then are relatively out of place.
  • Additional logging within the lexer and templater engines.
  • Allow meta segments to parse within Delimited grammars which otherwise don't allow gaps. This is facilitated through an optional argument to trim_non_code_segments.
  • Fix bug #1079, addressing issues with L025 and L026 with BigQuery column references involving STRUCT.
  • #1080 Add SET SCHEMA and DROP SCHEMA support to ANSI dialect.
  • Better exception handling for the simple parsing API (sqlfluff.parse) which now raises an exception which holds all potential parsing issues and prints nicely with more than one issue.
  • Fix bug #1037, in which fix logging had been sent to stdout when reading data from stdin.
  • Disabled models in the dbt templater are now skipped entirely rather than returning an untemplated file.
  • Add a changelog check to SQLFluff continuous integration.
  • Fix bug #1083, adding support for BigQuery named function arguments, used with functions such as ST_GEOGFROMGEOJSON()
  • Update documentation links to sqlfluff-online.

Contributors

Don't miss a new sqlfluff release

NewReleases is sending notifications on new releases.