SQL fluff
SQLFluff is a dialect-flexible and configurable SQL linter it works with Jinja templating and dbt™️. SQLFluff will auto-fix most linting errors, allowing you to focus your time on what matters.
Paradime provides an integration out of the box for you to run SQLFluff in your dbt™️ project.
Configuration
Create the .sqlfluff configuration file
.sqlfluff configuration fileTo get started simply you will need to create a file called .sqlfluff in your dbt™️ root directory (this is in the same directory where your dbt_project.yml lives.
Set your configuration file by adding supported rules
Now you will need to add your own configuration to decide which rules to enforce when running SQLFluff in the Paradime terminal.
You can copy and paste the below template to get started with some simple rules. Make sure to update line 4 with the appropriate sql dialect based on your data warehouse provider.
Running SQLFluff
SQLFluff provides a CLI to execute commands and lint your sql files in your dbt™️ project.
With Paradime you can execute SQLFluff with one click using the Prettify button in the terminal toolbar.
Simply open the file you want to lint and click on the Prettify button.
Last updated
Was this helpful?