New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L029: 「key」is recognized as keyword word in the BigQuery dialect when it shouldn't be #3696
Comments
BigQuery doesn’t have primary or foreign keys so we should reset these in this dialect allowing this keyword to be removed from the list: PrimaryKeyGrammar=Nothing(),
ForeignKeyGrammar=Nothing(), |
Oh sorry. I read L029 again. Unreserved keyword「key」is to avoid where possible in best practice. So this linter fail seems to be correct.
But I guess this above settings should be correct too. |
@tunetheweb
But this above settings seems to change dialect_bigquery. |
I’m not sure it is correct since I’m not sure |
Reopening this. the fix was made in #3714 so that BigQuery should now no longer need to have
Meaning the initial query still flags as a linting error when it shouldn't. @sabrikaragonen or @keyem4251 do you want to do that final step so we can close this? |
Search before asking
What Happened
I try this command to sample.sql.
↓ sample.sql
「key」is in bigquery_unreserved_keywords but SQLFluff lint result is fail.
Expected Behaviour
「key」does not fail in SQLFluff lint because set in bigquery_unreserved_keywords
Observed Behaviour
SQLFluff lint is failed.
↓ sample.sql
How to reproduce
SQLFluff version 1.2.1 and try Observed Behavior command, create file.
Dialect
BigQuery
Version
Configuration
Don't configure .sqlfluff and .sqlfluffignore.
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
The text was updated successfully, but these errors were encountered: