[ https://issues.apache.org/jira/browse/ARROW-8942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17133663#comment-17133663 ]
Neal Richardson commented on ARROW-8942: ---------------------------------------- I found the relevant python code, will do something like this in R too: {code} def _detect_compression(path): if isinstance(path, str): if path.endswith('.bz2'): return 'bz2' elif path.endswith('.gz'): return 'gzip' elif path.endswith('.lz4'): return 'lz4' elif path.endswith('.zst'): return 'zstd' {code} > [R] support read gzip csv files > ------------------------------- > > Key: ARROW-8942 > URL: https://issues.apache.org/jira/browse/ARROW-8942 > Project: Apache Arrow > Issue Type: New Feature > Components: R > Reporter: Dyfan Jones > Assignee: Neal Richardson > Priority: Major > Fix For: 1.0.0 > > > Hi all, > Apologises if this has already been covered by another ticket. Is it possible > for arrow to read in compress delimited files (for example gzip)? > Currently I get an error when trying to read in a compressed delimited file: > > {code:java} > vroom::vroom_write(iris, "iris.csv.gz", delim = ",") > arrow::read_csv_arrow("iris.csv.gz") > # Error in csv__TableReader_Read(self) : > # Invalid: CSV parse error: Expected 1 columns, got 4{code} > however it can be read in by vroom and readr: > {code:java} > vroom::vroom("iris.csv.gz") > readr::read_csv("iris.csv.gz") > {code} > > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)