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

[copy_from] AWS source #31144

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Conversation

ParkMyCar
Copy link
Member

@ParkMyCar ParkMyCar commented Jan 22, 2025

Stacked on top of: #30956

This PR implements a new AwsS3 OneshotSource that allows copying in files from S3, e.g.

COPY INTO my_table FROM 's3://my-test-bucket' (FORMAT CSV, FILES = ['important.csv']);

Along with FILES = [<files>] we also support a PATTERN = <glob> option which allows copying multiple files all at once.

Motivation

Fixes https://github.com/MaterializeInc/database-issues/issues/8860
Fixes https://github.com/MaterializeInc/database-issues/issues/8855

Tips for reviewer

Review only the final commit, the one titled "start, implementation of an S3 oneshot source"

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@ParkMyCar ParkMyCar force-pushed the copy/aws-source branch 7 times, most recently from 7defd19 to 58f62b2 Compare January 24, 2025 00:10
@ParkMyCar ParkMyCar marked this pull request as ready for review January 24, 2025 00:20
@ParkMyCar ParkMyCar requested review from a team as code owners January 24, 2025 00:20
@ParkMyCar ParkMyCar requested a review from aljoscha January 24, 2025 00:20
Copy link
Contributor

@jkosh44 jkosh44 left a comment

Choose a reason for hiding this comment

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

LGTM, but I think we should add tests for this.

use aws_types::sdk_config::SdkConfig;

pub use aws_sdk_s3::Client;
use bytes::Bytes;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is meant to go in the other import block?

Copy link
Member Author

Choose a reason for hiding this comment

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

ahh yeah I should move this up, thanks!

* add a new OneshotSource implementation
* support the FILES and PATTERN options for COPY FROM
@ParkMyCar
Copy link
Member Author

LGTM, but I think we should add tests for this.

I have a bunch of tests in a stacked PR, will get those up for review!

@ParkMyCar ParkMyCar enabled auto-merge (squash) January 29, 2025 15:21
@ParkMyCar ParkMyCar merged commit ab43e64 into MaterializeInc:main Jan 29, 2025
79 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