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

[feature request] read parquet from URL (or from raw vector?) #71

Open
tanho63 opened this issue Jun 19, 2024 · 5 comments
Open

[feature request] read parquet from URL (or from raw vector?) #71

tanho63 opened this issue Jun 19, 2024 · 5 comments
Labels
feature a feature request or enhancement

Comments

@tanho63
Copy link

tanho63 commented Jun 19, 2024

Hi! Excited by the looks of this package. A frequent use case I have is reading a parquet from a URL, e.g.

arrow::read_parquet("https://github.com/nflverse/nflverse-data/releases/download/pbp/play_by_play_2023.parquet")

Is this something that would be in-scope for nanoparquet?

@gaborcsardi
Copy link
Member

gaborcsardi commented Jun 19, 2024

Yes, we could definitely do one or both of those. The challenge for the HTTP is to keep the package lean, but reading from a raw vector is pretty straightforward. write_parquet() already supports writing to a raw vector.

Btw. we could also support reading from an R connection, then you could do

read_parquet(url("https://...."))

@gaborcsardi gaborcsardi added the feature a feature request or enhancement label Jun 19, 2024
@tanho63
Copy link
Author

tanho63 commented Jun 20, 2024

either of these would be great!

@mrcaseb
Copy link

mrcaseb commented Jun 20, 2024

Reading from a connection would be great as that's how we read rds files from url!

@gaborcsardi
Copy link
Member

To clarify, for a Parquet file, reading from a connection means that we would need to read the whole file first, save it to a temporary file, and then read it from there.

Which you can also do relatively easily as a workaround.

@gaborcsardi
Copy link
Member

Dev version can read from a connection now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants