SQLFluff

Learn how Paradime integrates with SQLFluff to automatically lint and format your dbt™ SQL files.

Paradime provides native integration with SQLFluff, enabling automatic linting and formatting of SQL files in your dbt™ project directly from the IDE. This integration helps maintain consistent code style and catch potential SQL issues early, with built-in support for dbt™ and Jinja templating.

Integration Features

  • One-click SQL linting through the Lint button

  • Built-in dbt™ templating support

  • Native IDE integration

  • Customizable linting rules

  • Auto-fix capabilities for common issues


Using the Integration

  1. Open a .sql file in your editor

  2. Click the Lint button in the Command Panel

  3. Review the changes made in Git Lite

    • Syntax errors

    • Style violations

    • Formatting suggestions

  4. If satisfied with Lint updates, Commit and Push your changes to your remote branch.

Using the Lint button for .sql file using SQLfluff

Configuration

Configure SQLFluff by creating a .sqlfluff file in your dbt™ project root directory:

  1. Create a .sqlfluff file in your dbt™ project root directory (same location as your dbt_project.yml)

  2. Add your configuration:

Visit SQLfluff documentation for a complete list of configuration options.

Want to automate SQLfluff linting? Learn how to set up SQLfluff pre-commit hooks to automatically lint SQL files before each commit.


Common Rules

SQLFluff enforces several key formatting rules:

  • Consistent keyword capitalization

  • Required table aliasing

  • Maximum line length

  • Proper indentation

  • Column ordering

dbt™ Support

The integration automatically handles dbt™-specific features:

  • Jinja templating

  • ref() and source() functions

  • dbt™ macros

  • Project configurations

Last updated

Was this helpful?