You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jiangzhx (via GitHub)" <gi...@apache.org> on 2023/04/04 06:43:20 UTC
[GitHub] [arrow-datafusion] jiangzhx commented on issue #5657: Request for documentation for compressed CSV/JSON support
jiangzhx commented on issue #5657:
URL: https://github.com/apache/arrow-datafusion/issues/5657#issuecomment-1495432405
@ismail
Followed @Jefffrey clue and finally this problem was solved.
when file name end with "csv.bz2", should set option with .file_extension("csv.bz2").
```
let csv_options = CsvReadOptions::default()
.has_header(true)
.file_compression_type(FileCompressionType::BZIP2)
.file_extension("csv.bz2");
let df = ctx
.read_csv(&format!("{testdata}/csv/summary.csv.bz2"), csv_options)
.await?;
let df = df
.filter(col("status").eq(lit("OK")))?
.select_columns(&["name", "id"])?;
df.show().await?;
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org