Skip to content
Discussion options

You must be logged in to vote

You can configure the options when using the DataFrame::write_parquet API like so:

    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 #13323

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@theelderbeever
Comment options

@Jefffrey
Comment options

Jefffrey Dec 4, 2025
Collaborator

Answer selected by Jefffrey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants