All apps/SQLFluff

SQLFluff

sqlfluff

SQLFluff is a dialect-flexible and configurable SQL linter, designed with ELT applications in mind and working with Jinja and dbt.

Runs as sqlfluff|macOS, Linux, Windows|sqlfluff.com

Command form

ai-draft · 2 tasks · 21 fields

Lint or auto-fix SQL files. Parse, rules and dialects listing commands are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui sqlfluff

sqlfluff lint

Lint SQL

Report style and syntax violations in SQL files.

Lint SQLExample values, fixed in this page — nothing here reaches a terminal
Basic
Files or directories
any
Dialect*
string
Only these rules
string
Exclude rules
string
Output format
5 choicesenum
TasksEach one presets the form for one job
Lint files
filesdialectrulesexclude_rulesformat
ParametersOnly these flags are editable in the form
Files or directories
SQL files or directories; leave empty to read stdin.
path · positional 0 · repeatable
Dialect
SQL dialect, e.g. ansi, postgres, bigquery.
string
--dialect-dansibigqueryhivemysqloraclepostgresredshiftsnowflakespark3teradata
Only these rules
Narrow the run to specific rules.
string
--rules-r
Exclude rules
Exclude specific rules.
string
--exclude-rules-e
Templater
The templater to use (default jinja).
string
--templater-trawjinjapythonplaceholders
Output format
Format for the results.
enum
--format-fhumanjsonyamlgithub-annotationgithub-annotation-native
Extra config file
Include an additional config file.
path
--config
No color
Output without ANSI color codes.
boolean
--nocolor-n
Verbosity
Stackable verbosity.
count
--verbose-v
Always exit 0
Exit code is zero regardless of violations.
boolean
--nofail

sqlfluff fix

Fix SQL

Rewrite SQL files in place to resolve fixable violations.

Fix SQLExample values, fixed in this page — nothing here reaches a terminal
Basic
Files or directories*
any
Dialect*
string
Only these rules
string
Exclude rules
string
TasksEach one presets the form for one job
Fix files
filesdialectrulesexclude_rules
ParametersOnly these flags are editable in the form
Files or directories
SQL files or directories; leave empty to read stdin.
path · positional 0 · repeatable
Dialect
SQL dialect, e.g. ansi, postgres, bigquery.
string
--dialect-dansibigqueryhivemysqloraclepostgresredshiftsnowflakespark3teradata
Only these rules
Narrow the run to specific rules.
string
--rules-r
Exclude rules
Exclude specific rules.
string
--exclude-rules-e
Templater
The templater to use (default jinja).
string
--templater-trawjinjapythonplaceholders
Output format
Format for the results.
enum
--format-fhumanjsonyamlgithub-annotationgithub-annotation-native
Extra config file
Include an additional config file.
path
--config
No color
Output without ANSI color codes.
boolean
--nocolor-n
Verbosity
Stackable verbosity.
count
--verbose-v
Suffix for fixed files
Optional suffix to add to fixed files.
string
--fixed-suffix-x
Show lint violations
Show lint violations.
boolean
--show-lint-violations
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed sqlfluff against its version. A form that does not match your version is not offered.