keyword-identifier
What it does
Section titled “What it does”Reports an unquoted name written like a keyword of the dialect, such as a column called year or name.
Why it matters
Section titled “Why it matters”A name that is a keyword can be read as the keyword. In some positions the parser takes the keyword, in others the name, and a new version of the database may reserve the word and break the query.
To fix, rename it, or quote it.
Example
Section titled “Example”select "A", "a", "ab c", "SELECT", date, name, a as filter from t;Configuration
Section titled “Configuration”sql: lint: rules: keyword-identifier: warn # off (default), warn, errorEnabled by the presets: sql/sqlfluff.
Suppress one line with sudsy-disable-next-line keyword-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 | RF04 |
full |