Sqlfluff

Latest version: v3.2.5

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 22 of 26

0.3.5

Not secure
Added

- Patterns and Anti-patterns in documentation. Thanks [flpezet](https://github.com/flpezet).
- Functions in `GROUP BY`. Thanks [flpezet](https://github.com/flpezet).

Changed

- Deep bugfixes in the parser to handle simple matching better for a few
edge cases. Also added some logging deeper in the parser.
- Added in the `SelectableGrammar` and some related segments to make it
easier to refer to _select-like_ things in other grammars.
- Fixes to `CASE` statement parsing. Thanks [azhard](https://github.com/azhard).
- Fix to snowflake `SAMPLE` implementation. Thanks [rkm3](https://github.com/rkm3).
- Numerous docs fixes. Thanks [SimonStJG](https://github.com/SimonStJG),
[flpezet](https://github.com/flpezet), [s-pace](https://github.com/s-pace),
[nolanbconaway](https://github.com/nolanbconaway).

0.3.4

Not secure
Changed

- Implementation of the bigquery `CREATE MODEL` syntax. Thanks [barrywhart](https://github.com/barrywhart).
- Bugfixes for:
- Edge cases for L006
- False alarms on L025
- `ORDER BY x NULLS FIRST|LAST`
- `FOR` keyword in bigquery `SYSTEM_TIME` syntax.

0.3.3

Not secure
Added

- Added the `--nofail` option to `parse` and `lint` commands to assist
rollout.
- Added the `--version` option to complement the `version` option already
available on the cli.
- Parsing for `ALTER TABLE`.
- Warning for unset dialects when getting parsing errors.
- Configurable line lengths for output.

0.3.2

Not secure
Added

- Support for the Teradata dialect. Thanks [Katzmann1983](https://github.com/Katzmann1983)!
- A much more detailed getting started guide in the docs.
- For the `parse` command, added the `--profiler` and `--bench` options
to help debugging performance issues.
- Support for the `do` command in the jinja templater.
- Proper parsing of the concatenate operator (`||`).
- Proper indent handling of closing brackets.
- Logging and benchmarking of parse performance as part of the CI pipeline.
- Parsing of object references with defaults like `my_db..my_table`.
- Support for the `INTERVAL '4 days'` style interval expression.
- Configurable trailing or leading comma linting.
- Configurable indentation for `JOIN` clauses.
- Rules now have their own logging interface to improve debugging ability.
- Snowflake and Postgres dialects.
- Support for a `.sqlfluffignore` file to ignore certain paths.
- More generic interfaces for managing keywords in dialects, including `set`
interfaces for managing and creating keywords and the `Ref.keyword()` method
to refer to them, and the ability to refer directly to keyword names in
most grammars using strings directly. Includes `SegmentGenerator` objects
to bind dialect objects at runtime from sets. Thanks [Katzmann1983](https://github.com/Katzmann1983)!
- Rule `L029` for using unreserved keywords as variable names.
- The jinja templater now allows macros loaded from files, and the
hydration of variables ending in `_path` in the config files.
- JSON operators and the `DISTINCT ON ()` syntax for the postgres dialect.

Changed

- Refactor of whitespace and non-code handling so that segments are
less greedy and default to not holding whitespace on ends. This allows
more consistent linting rule application.
- Change config file reading to _case-sensitive_ to support case
sensitivity in jinja templating.
- Non-string values (including lists) now function in the python
and jinja templating libraries.
- Validation of the match results of grammars has been reduced. In
production cases the validation will still be done, but only on
_parse_ and not on _match_.
- At low verbosities, python level logging is also reduced.
- Some matcher rules in the parser can now be classified as _simple_
which allows them to shortcut some of the matching routines.
- Yaml output now double quotes values with newlines or tab characters.
- Better handling on hanging and closing indents when linting rule L003.
- More capable handline of multi-line comments so that indentation
and line length parsing works. This involves some deep changes to the
lexer.
- Getting violations from the linter now automatically takes into account
of ignore rules and filters.
- Several bugfixes, including catching potential infinite regress during
fixing of files, if one fix would re-introduce a problem with another.
- Behaviour of the `Bracketed` grammar has been changed to treat its
content as a `Sequence` rather than a `OneOf`.
- Move to `SandboxedEnvironment` rather than `Environment` for jinja
templating for security.
- Improve reporting of templating issues, especially for the jinja templater
so that missing variables are rendered as blanks, but still reported as
templating violations.

0.3.1

Not secure
Added

- Support for `a.b.*` on top of `a.*` in select target expressions.

0.3.0

Not secure
Changed

- Deprecated python 2.7 and python 3.4 which are now both past
their maintenance horizon. The 0.2.x branch will remain available
for continued development for these versions.
- Rule L003 is now significantly smarter in linting indentation
with support for hanging indents and comparison to the most
recent line which doesn't have an error. The old (more simple)
functionality of directly checking whether an indent was a
multiple of a preset value has been removed.
- Fixed the "inconsistent" bug in L010. Thanks [nolanbconaway](https://github.com/nolanbconaway).
- Updated logging of parsing and lexing errors to have more useful
error codes.
- Changed parsing of expressions to favour functions over identifiers
to [fix the expression bug](https://github.com/sqlfluff/sqlfluff/issues/96).
- Fixed the "inconsistent" bug in L010. Thanks [nolanbconaway](https://github.com/nolanbconaway).
- Moved where the `SELECT` keyword is parsed within a select statement,
so that it belongs as part of the newly renamed `select_clause` (renamed
from previously `select_target_group`).
- Clarified handling of the `type` and `name` properties of the BaseSegment
class and its children. `name` should be specific to a particular kind
of segment, and `type` should express a wider group. Handling of the
`newline`, `whitespace` and `comma` segments has been updated so that
we use the `type` property for most use cases rather than `name`.

Added

- _Meta segments_ for indicating where things can be present in the parsed
tree. This is mostly illustrated using the `Indent` and `Dedent` segments
used for indicating the position of theoretical indents in the structure.
Several helper functions have been added across the codebase to handle
this increase in the kinds of segments which might be encountered by
various grammars.
- Rule L016 has been added to lint long lines. In the `fix` phase of this
rule, there is enough logic to try and reconstruct a sensible place for
line breaks as re-flow the query. This will likely need further work
and may still encounter places where it doesn't fix all errors but should
be able to deal with the majority of simple cases.
- BigQuery dialect, initially just for appropriate quoting.
- Added parsing of DDL statements such as `COMMIT`, `DROP`, `GRANT`, `REVOKE`
and `ROLLBACK`. Thanks [barrywhart](https://github.com/barrywhart).
- `--format` option to the `parse` command that allows a yaml output. This
is mostly to make test writing easier in the development process but
might also be useful for other things.
- Parsing of set operations like `UNION`.
- Support for the `diff-cover` tool. Thanks [barrywhart](https://github.com/barrywhart).
- Enabled the `fix` command while using `stdin`. Thanks [nolanbconaway](https://github.com/nolanbconaway).
- Rule to detect incorrect use of `DISTINCT`. Thanks [barrywhart](https://github.com/barrywhart).
- Security fixes from DeepCover. Thanks [sanketsaurav](https://github.com/sanketsaurav).
- Automatic fix testing, to help support the newer more complicated rules.
- Interval literals
- Support for the `source` macro from dbt. Thanks [Dandandan](https://github.com/Dandandan)
- Support for functions with spaces between the function name and the brackets
and a linting rule `L017` to catch this.
- Efficiency cache for faster pruning of the parse tree.
- Parsing of array notation as using in BigQuery and Postgres.
- Enable the `ignore` parameter on linting and fixing commands to ignore
particular kinds of violations.

Page 22 of 26

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.