eitsupi commented on issue #83:
URL: https://github.com/apache/arrow-cookbook/issues/83#issuecomment-1187635564
I think this is a great use case for combining `arrow` and `duckdb`.
There is no support for slice_* functions in `arrow` and `duckdb` does not
yet have the ability to open a dataset.
```r
library(arrow)
library(dplyr)
tf <- tempfile()
dir.create(tf)
nycflights13::flights |>
group_by(month) |>
write_dataset(tf)
df <- open_dataset(tf, hive_style = TRUE) |>
group_by(month) |>
to_duckdb() |>
slice_sample(n = 2) |>
collect()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]