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

Add Qualify statement to Bigquery #1242

Closed
tuanchris opened this issue Aug 2, 2021 · 2 comments · Fixed by #1281
Closed

Add Qualify statement to Bigquery #1242

tuanchris opened this issue Aug 2, 2021 · 2 comments · Fixed by #1281
Labels
bug Something isn't working

Comments

@tuanchris
Copy link

-- If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the sqlfluff parse output, sqlfluff lint output and sqlfluff fix output when relevant. Finally, please add any labels that are related to the issue before submitting so that it can be addressed easily! --

Expected Behaviour

Qualify should be parsed for BigQuery dialect

Observed Behaviour

found unparsable section: '\n qualify row_num = 1'

Steps to Reproduce

Version

Include the output of sqlfluff --version along with your Python version

sqlfluff, version 0.6.2

Configuration

Include your SQLFluff configuration here
@tuanchris tuanchris added the bug Something isn't working label Aug 2, 2021
@barrywhart
Copy link
Member

Can you provide an example query that produces the issue? Also, if possible, a link to the BigQuery documentation for QUALIFY?

@tuanchris
Copy link
Author

@barrywhart Here is the Bigquery Documentation for QUALIFY. A sample query could be:

SELECT
  id,
  ROW_NUMBER() OVER(PARTITION BY id ORDER BY created_date DESC) rownum
FROM `dataset.schema.source_table`
where true 
qualify rownum = 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants