SQLFluff integration

SQLFluff Integration

Save time and auto fix your SQL code.

SQLFluff for linting and auto-fixing of your code.SQLFluff for linting and auto-fixing of your code.


SQLFluff (opens in a new tab) is a SQL linter that improves your SQL code quality and development workflow. The key benefits of SQLFluff are:

  • SQL Linting: SQLFluff helps find issues in your SQL code to enforce a consistent code style and early detection of errors. This ensures better alignment within your team, as everyone follows the same code style.

  • Auto-Fixing: You can activate an automatic fix for most issues detected in the linting. This feature helps you save time and stay focused on coding.

SQL Linting

SQLFluff analyzes the code for a set of predefined rules such as syntax errors, undefined variables, unused variables, type inconsistencies, unreachable code, unused imports, code formatting, or configurable custom rules.

SQL Auto-Fix

SQLFluff can automatically fix your SQL code by handling indentation, line breaks, capitalization, and other formatting rules. To activate the formatting of your SQL file, you have two options:

  • Use the keyboard shortcut SHIFT + CMD / CTRL + F in the data catalog.
  • Use the keyboard shortcut SHIFT + OPT / ALT + F or right-click on the page in the code editor.

Custom SQLFLuff configurations

You can customize SQLFluff rules by adding a .sqlfluff file at the root level of your project. Here's an example:


allow_scalar= True
single_table_references = consistent
unquoted_identifiers_policy = all
capitalisation_policy = upper

Refer to the complete list of SQLFluff rules (opens in a new tab) for more details.


Why are certain dbt macros not recognized properly?