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

Redshift features not supported yet #1642

Closed
tunetheweb opened this issue Oct 13, 2021 · 4 comments
Closed

Redshift features not supported yet #1642

tunetheweb opened this issue Oct 13, 2021 · 4 comments
Labels
enhancement New feature or request new dialect For issues relating to currently unsupported dialects redshift Issues relating to Amazon Redshift dialect

Comments

@tunetheweb
Copy link
Member

tunetheweb commented Oct 13, 2021

Copied from: #612 (comment)

Reporting a few more examples of Redshift-specific functionality:

The COPY command available in Redshift does not exist in PostgreSQL, which makes it impossible to sqlfluff lint or sqlfluff fix any COPY query, e.g.:
In test.sql:

COPY catdemo
FROM 's3://awssampledbuswest2/tickit/category_pipe.txt'
IAM_ROLE 'arn:aws:iam::<aws-account-id>:role/<role-name>'
REGION 'us-west-2';

❯ sqlfluff lint test.sql
== [test.sql] FAIL
L: 1 | P: 1 | PRS | Found unparsable section: "COPY catdemo\nFROM
| 's3://awssampledbuswes..."

A similar scenario occurs with the CREATE EXTERNAL TABLE Redshift command.

Redshift INSERT, DELETE, and UPDATE statements do not support WITH clauses as PostgreSQL does. This opens the door to having a Redshift-specific rule to catch this.

@tunetheweb tunetheweb added enhancement New feature or request redshift Issues relating to Amazon Redshift dialect labels Oct 13, 2021
@WittierDinosaur
Copy link
Contributor

I think this diverges enough to be worth having a redshift dialect

@WittierDinosaur WittierDinosaur added the new dialect For issues relating to currently unsupported dialects label Oct 14, 2021
@tunetheweb
Copy link
Member Author

Yup that's what I thought: See: #1641

At the moment based on postgres which I think makes sense. But know you had some concerns before on that (but I think on dialects that didn't really have much in common with postgres to be honest) so let me know your thoughts.

@farfromunique
Copy link

Redshift dialect support was added in 0.7.0, it seems. Should this issue be closed?

@tunetheweb
Copy link
Member Author

There were a few items listed in #612 before Redshift was supported. The ones above were not in that initial support (when I closed #612 as we no do support Redshift as you say). So copied to this new issue. Not sure if those specific examples are supported now, and they probably should be individual, more detailed descriptions to be honest.

Let's close and get people to open new issues with more detail if they need those functionalist and they don't yet exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new dialect For issues relating to currently unsupported dialects redshift Issues relating to Amazon Redshift dialect
Projects
None yet
Development

No branches or pull requests

3 participants