special-chars-in-identifier
What it does
Section titled “What it does”Reports a quoted identifier with a space or another character that is not a letter, a digit or an underscore. A column of a select element that has an alias is left alone.
Why it matters
Section titled “Why it matters”A name with special characters has to be quoted in every query that uses it, and the quotes differ between databases. Tools that generate code from the schema fail on such names.
To fix, rename it with letters, digits and underscores.
Example
Section titled “Example”select "a b", "ab", x as "c d" from "my t" as "q r";Configuration
Section titled “Configuration”sql: lint: rules: special-chars-in-identifier: warn # off (default), warn, errorEnabled by the presets: sql/sqlfluff.
Suppress one line with sudsy-disable-next-line special-chars-in-identifier in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| sqlfluff | RF05 |
full |