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

Snowflake: Add support for CONNECT BY #5863

Open
2 of 3 tasks
karenderer opened this issue May 9, 2024 · 0 comments
Open
2 of 3 tasks

Snowflake: Add support for CONNECT BY #5863

karenderer opened this issue May 9, 2024 · 0 comments
Labels
bug Something isn't working snowflake Issues related to the Snowflake dialect

Comments

@karenderer
Copy link

Search before asking

  • I searched the issues and found no similar issues.

What Happened

CONNECT BY syntax is valid in Snowflake and is not currently supported in sqlfluff.

Expected Behaviour

The CONNECT BY construct should be parseable.

Observed Behaviour

When using CONNECT BY sqlfluff returns

Found unparsable section: 'connect by prior foo = bar'

and

WARNING: Parsing errors found and dialect is set to 'snowflake'. Have you configured your dialect correctly?

How to reproduce

with tbl as (
    select 'A' as foo, 'B' as bar
    union all
    select 'B' as foo, 'C' as bar
)

select
    *,
    connect_by_root bar as connect_by_root
from tbl
connect by prior foo = bar

Dialect

dialect = snowflake

Version

$ sqlfluff --version
sqlfluff, version 3.0.6

Configuration

.sqlfluff

[sqlfluff]
dialect = snowflake
templater = jinja
sql_file_exts = .sql
rules =
    capitalisation.keywords,
    capitalisation.literals,
    capitalisation.functions,
    capitalisation.types,
    capitalisation.identifiers

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

@karenderer karenderer added the bug Something isn't working label May 9, 2024
@github-actions github-actions bot added the snowflake Issues related to the Snowflake dialect label May 9, 2024
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

No branches or pull requests

1 participant