-
Notifications
You must be signed in to change notification settings - Fork 6
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
Proof-of-concept pluggable i/o #5
Conversation
This looks very compelling to me. Regarding the compression, this is only an issue on the write side of things, right? (i.e. we read This would restrict us to functions that support R connections as well as file names, but at least it would mean opening up all the base |
Could a DBI connection be just another instance of a streamable table then? |
@krlmlr Yes, that's an excellent suggestion, I imagine it could. Should be relatively straight forward to copy chunk by chunk for a DBI connection, I imagine in that case we would basically just ignore any option regarding compression(?) I think we do want to generalize beyond tsv, but still need to think about how best to get the abstraction right. In my above comments I was thinking 'anything that can read / write through an R connection (e.g. |
Sorry @cboettig - to be clear - this can be made mergeable but you would want to fix the assorted issues flagged in my opening comment I suspect 😀 |
@richfitz thanks for this. I've implemented a version of this based on your proposal in #10. Needed to tweak the base methods a bit to get them to work, but I think this checks the boxes above now. I've made the base methods the default and to drop the hard dependency on readr, though I keep opt-int streamable functions for readr tables as well. |
DO NOT MERGE
This is a starting point in lieu of a long description - this is how I'd be inclined to start expanding the i/o to remove the strong readr dependency and to allow non tsv formats. Only formats that allow append will work (so row-wise not column-wise).
In the form as submitted this supports the current behaviour of the package via
readr
with an entirely untested bit of scaffolding for a base R version.Pending, should this approach feel useful
streamable_table
should be checked carefullystopifnot
with reasonable assertionsark
readr
is annoyingly chatty and that should be dialed backFor #3