Skip to content

Redshift: Add support for IAM_ROLE and IGNOREHEADER COPY options #1968

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

Merged
merged 2 commits into from
Aug 20, 2025

Conversation

yoavcloud
Copy link
Contributor

No description provided.

@@ -16256,3 +16256,25 @@ fn parse_notnull() {
// for unsupported dialects, parsing should stop at `NOT NULL`
notnull_unsupported_dialects.expr_parses_to("NOT NULL NOTNULL", "NOT NULL");
}

#[test]
fn pares_copy_options() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fn pares_copy_options() {
fn parse_copy_options() {

#[test]
fn pares_copy_options() {
let copy = verified_stmt(
r#"COPY dst (c1, c2, c3) FROM 's3://redshift-downloads/tickit/category_pipe.txt' IAM_ROLE 'arn:aws:iam::123456789:role/role1' CSV IGNOREHEADER 1"#,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests to cover the IAM ROLE DEFAULT and CSV IGNOREHEADER AS ... scenarios?

@yoavcloud yoavcloud requested a review from iffyio August 12, 2025 10:58
@yoavcloud yoavcloud force-pushed the redshift_copy_options branch 2 times, most recently from ed0859d to 18c466d Compare August 14, 2025 13:18
@iffyio
Copy link
Contributor

iffyio commented Aug 19, 2025

@yoavcloud could you take a look at the conflicts on the branch when you have some time?

@yoavcloud yoavcloud force-pushed the redshift_copy_options branch from 18c466d to 43b9f45 Compare August 20, 2025 08:43
@yoavcloud
Copy link
Contributor Author

Conflicts resolved @iffyio

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @yoavcloud!
cc @alamb

@iffyio iffyio merged commit 3b52428 into apache:main Aug 20, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants