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 .. TO functionality #32

Merged
merged 1 commit into from
May 27, 2024
Merged

COPY .. TO functionality #32

merged 1 commit into from
May 27, 2024

Conversation

mkaruza
Copy link
Collaborator

@mkaruza mkaruza commented May 20, 2024

  • Now we are intercepting utility that will handle COPY utility. COPY through DuckDB will only be executed if COPY destination starts with 's3://' i.e. to S3 bucket. User first needs to setup valid quack.cloud_secret. Both COPY from table or specified query works.

@wuputah wuputah requested review from Tishj and wuputah May 21, 2024 21:49
@wuputah
Copy link
Collaborator

wuputah commented May 21, 2024

is there a way we can add tests to this? it would need creds, which is tricky.

@Tishj
Copy link
Collaborator

Tishj commented May 22, 2024

For our own tests we use Minio to host a server locally (in the CI) we can connect to

context.transaction.Commit();

if (strlen(quack_secret) != 0) {
std::vector<std::string> quackSecret = quack::tokenizeString(quack_secret, '#');
Copy link
Collaborator

Choose a reason for hiding this comment

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

are we in control of this string?
I noticed the length is never checked or asserted, but we blindly access [1], [2], [3] (0 is ignored?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This PR is still in progress but i leave comment that will apply in future. Yes we control this variable, once the user sets this with SET quack.cloud_secret to '...' function quack_cloud_secret_check_hooks is responsible for initial checking. So if this is successful we know that there are all required parameters

* Now we are intercepting utility that will handle COPY utility. COPY
  through DuckDB will only be executed if COPY destination starts with
  's3://' i.e. to S3 bucket. User first needs to setup valid
  `quack.cloud_secret`. Both COPY from table or specified query works.
@mkaruza mkaruza merged commit 456f8a7 into main May 27, 2024
2 checks passed
@mkaruza mkaruza deleted the copy-to branch May 27, 2024 08:05
@mkaruza mkaruza mentioned this pull request May 27, 2024
2 tasks
@wuputah wuputah added this to the 0.1.0 milestone May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants