Skip to content
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

bug - typo in keyword in SnowFlake dialect #3812

Closed
3 tasks done
Gal40n04ek opened this issue Aug 30, 2022 · 0 comments · Fixed by #3813
Closed
3 tasks done

bug - typo in keyword in SnowFlake dialect #3812

Gal40n04ek opened this issue Aug 30, 2022 · 0 comments · Fixed by #3813
Labels
bug Something isn't working snowflake Issues related to the Snowflake dialect

Comments

@Gal40n04ek
Copy link
Contributor

Search before asking

  • I searched the issues and found no similar issues.

What Happened

There's a typo in dialect_snowflake.py in line 1935. Sequence("APPLY", "RAW", "ACCESS", "POLICY") instead of Sequence("APPLY", "ROW", "ACCESS", "POLICY")

Expected Behaviour

SQL statements should be parsed without errors

Observed Behaviour

raise RuntimeError(
RuntimeError: Grammar refers to 'RawKeywordSegment' which was not found in the snowflake dialect. Perhaps specify the keyword? https://github.com/sqlfluff/sqlfluff/wiki/Contributing-Dialect-Changes#keywords

How to reproduce

  1. Write a file.sql:
CREATE ROLE IF NOT EXISTS NEW_ROLE;

GRANT APPLY MASKING POLICY
  ON ACCOUNT TO ROLE NEW_ROLE;

GRANT CREATE MASKING POLICY
  ON SCHEMA MY_DB.MY_SCHEMA TO ROLE NEW_ROLE;
  1. Run command:
    sqlfluff lint file.sql --dialect snowflake

Dialect

snowflake

Version

sqlfluff 1.3.0
Python 3.9.12

Configuration

default

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

@Gal40n04ek Gal40n04ek added the bug Something isn't working label Aug 30, 2022
@github-actions github-actions bot added the snowflake Issues related to the Snowflake dialect label Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working snowflake Issues related to the Snowflake dialect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant