RBENREJEB@RBR-OS:/OPT/DATAFORM-INTELLIJ-PLUGIN/FEATURES/FORMATTING$ CAT README
FEATURES
Formatting
Google Cloud Dataform Plugin for IntelliJ · Features
Code ▸ Reformat Code (Ctrl+Alt+L) formats SQLX files.
Built-in formatter
The built-in formatter knows the structure of a SQLX file: the config { } block, js { } blocks
and the SQL query are each formatted as the language they contain.
SQLFluff
To format with SQLFluff instead, install it (pip install sqlfluff) and set
it up under SQLFluff formatter in the
plugin settings:
- Executable: the path to
sqlfluff. The plugin runssqlfluff fix --dialect bigqueryon the SQL of the file; - Config file: an optional
.sqlflufffile with your rules, passed as--config; - Extra arguments: added after the arguments above, separated by spaces.
Some of SQLFluff’s default rules do more than change the layout. Rule ST06 moves plain columns before calculated ones in a
SELECT, so the plugin runs SQLFluff with--exclude-rules ST06to keep your column order. It doesn’t when you set a Config file or pass--exclude-rulesin Extra arguments: your own rules then apply.