thisisnic commented on issue #38031:
URL: https://github.com/apache/arrow/issues/38031#issuecomment-1748601968

   Could you do something like this?  
   
   ``` r
   library(arrow)
   #> Some features are not enabled in this build of Arrow. Run `arrow_info()` 
for more information.
   #> 
   #> Attaching package: 'arrow'
   #> The following object is masked from 'package:utils':
   #> 
   #>     timestamp
   library(dplyr)
   #> 
   #> Attaching package: 'dplyr'
   #> The following objects are masked from 'package:stats':
   #> 
   #>     filter, lag
   #> The following objects are masked from 'package:base':
   #> 
   #>     intersect, setdiff, setequal, union
   
   tf <- tempfile()
   dir.create(tf)
   write_dataset(group_by(mtcars, am), tf, format = "csv")
   
   columns_i_care_about <- c("mpg", "hp")
   
   open_dataset(tf, format = "csv") %>%
     select(!!columns_i_care_about) %>%
     collect()
   #> # A tibble: 32 × 2
   #>      mpg    hp
   #>    <dbl> <int>
   #>  1  21.4   110
   #>  2  18.7   175
   #>  3  18.1   105
   #>  4  14.3   245
   #>  5  24.4    62
   #>  6  22.8    95
   #>  7  19.2   123
   #>  8  17.8   123
   #>  9  16.4   180
   #> 10  17.3   180
   #> # ℹ 22 more rows
   ```
   
   <sup>Created on 2023-10-05 with [reprex 
v2.0.2](https://reprex.tidyverse.org)</sup>
    
   If not, please can you make me a small reprex showing the kind of thing 
you'd like to do?


-- 
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]

Reply via email to