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

Athena create table for iceberg with partitoned by fails #5398

Open
3 tasks done
jverhoeks opened this issue Nov 11, 2023 · 0 comments · May be fixed by #5399
Open
3 tasks done

Athena create table for iceberg with partitoned by fails #5398

jverhoeks opened this issue Nov 11, 2023 · 0 comments · May be fixed by #5399
Labels
athena Issues relating to the Athena dialect bug Something isn't working

Comments

@jverhoeks
Copy link

jverhoeks commented Nov 11, 2023

Search before asking

  • I searched the issues and found no similar issues.

What Happened

The SQL lint for a create table with AThena and iceberg fails

According to the documentation a create table for iceberg is as following:

https://docs.aws.amazon.com/athena/latest/ug/querying-iceberg-creating-tables.html

CREATE TABLE iceberg_table (id bigint, data string, category string) PARTITIONED BY (category)) LOCATION 's3://DOC-EXAMPLE-BUCKET/your-folder/' TBLPROPERTIES ( 'table_type' = 'ICEBERG' )

When running lint this fails as the PARTIONED BY isn't recognized by the parser.

L: 3 | P: 1 | PRS | Line 26, Position 1: Found unparsable section: | "PARTITIONED BY (category)\nLOCATION 's..."

Expected Behaviour

Parsing it correctly

Observed Behaviour

`L: 3 | P: 1 | PRS | Line 26, Position 1: Found unparsable section:
| "PARTITIONED BY (category)\nLOCATION 's..."

How to reproduce

Use the example and run sqlfluff lint --dialect athena test.sql

Dialect

Athena

Version

sqlfluff, version 2.3.5

Configuration

[sqlfluff]
max_line_length = 100
templater = python

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

@jverhoeks jverhoeks added the bug Something isn't working label Nov 11, 2023
@github-actions github-actions bot added the athena Issues relating to the Athena dialect label Nov 11, 2023
@jverhoeks jverhoeks linked a pull request Nov 11, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
athena Issues relating to the Athena dialect bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant