RBR-OS
[G]ITHUB v2026.10 · APACHE-2.0

Formatting

Google Cloud Dataform Plugin for IntelliJ · Features

Code ▸ Reformat Code (Ctrl+Alt+L) formats SQLX files.

VID.01 // Reformatting gold_customer_ltv.sqlx with SQLFluff

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 runs sqlfluff fix --dialect bigquery on the SQL of the file;
  • Config file: an optional .sqlfluff file with your rules, passed as --config;
  • Extra arguments: added after the arguments above, separated by spaces.
FIG.01 // gold_customer_ltv.sqlx after formatting

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 ST06 to keep your column order. It doesn’t when you set a Config file or pass --exclude-rules in Extra arguments: your own rules then apply.