GitHub user Jefffrey added a comment to the discussion: How do you write a
single parquet file with a specified compression?
You can configure the options when using the `DataFrame::write_parquet` API
like so:
```rust
let mut options = TableParquetOptions::default();
options.global.compression =
Some(datafusion::parquet::basic::Compression::SNAPPY.to_string());
parquet_df
.write_parquet(
"test_parquet1",
DataFrameWriteOptions::default().with_single_file_output(true),
Some(options),
)
.await?;
```
Which should achieve what you need. To note there is currently an issue with
writing single files where a directory is actually being produced, see
https://github.com/apache/datafusion/issues/13323
GitHub link:
https://github.com/apache/datafusion/discussions/17578#discussioncomment-15142467
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]