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

Use Glob in PUT file paths and Allow for Multi File Upload #13

Merged
merged 28 commits into from
Mar 16, 2024

Conversation

colin99d
Copy link
Contributor

@colin99d colin99d commented Jan 14, 2024

This is a work in progress, I would be very thankful for any feedback.

By adding the GLOB package, file paths like the one below are now allowed:
api.exec(&format!("PUT file://{} @%OSCAR_AGE_MALE;", "/Users/colin/test-snowflake/data/*.csv"))

This PR uses Tokio tasks to manage spawn a thread for each individual file.

This PR also moves libraries only required for the PUT command into the file feature

@colin99d colin99d changed the title WIP: Use Glob in PUT file paths and Allow for Multi File Upload Use Glob in PUT file paths and Allow for Multi File Upload Jan 14, 2024
snowflake-api/src/lib.rs Outdated Show resolved Hide resolved
snowflake-api/src/lib.rs Outdated Show resolved Hide resolved
snowflake-api/Cargo.toml Outdated Show resolved Hide resolved
snowflake-api/src/lib.rs Outdated Show resolved Hide resolved
snowflake-api/Cargo.toml Outdated Show resolved Hide resolved
snowflake-api/Cargo.toml Outdated Show resolved Hide resolved
snowflake-api/src/helpers.rs Outdated Show resolved Hide resolved
snowflake-api/src/helpers.rs Outdated Show resolved Hide resolved
snowflake-api/src/helpers.rs Outdated Show resolved Hide resolved
snowflake-api/src/helpers.rs Outdated Show resolved Hide resolved
snowflake-api/src/lib.rs Outdated Show resolved Hide resolved
@colin99d
Copy link
Contributor Author

FYI: Until the limit to concurrency is implemented this PR is not ready for review. I am more than happy for your comments. But please know some of this code is stuff I plan to clean on my own (right now this is all being coded while I am on planes and busses).

@colin99d
Copy link
Contributor Author

@andrusha besides the two questions I had this PR is good to go. I decided to create a way for the user to define the file size and concurrency thresholds. Let me know your thoughts!

andrusha added 5 commits March 3, 2024 14:19
Use spawn blocking for computationally intensive glob traverse
Use async tokio fs for metadata fetching
Move all PUT query logic into put.rs file
Delete files feature for now
@andrusha andrusha requested a review from dmzmk March 16, 2024 14:08
Copy link
Collaborator

@dmzmk dmzmk left a comment

Choose a reason for hiding this comment

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

lgtm

@andrusha andrusha merged commit b908ee0 into andrusha:main Mar 16, 2024
7 checks passed
@colin99d
Copy link
Contributor Author

lgtm

Спасибо!

@colin99d colin99d deleted the MultiFile branch March 18, 2024 16:40
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.

3 participants