pub enum FileTypeWriterOptions {
Parquet(ParquetWriterOptions),
CSV(CsvWriterOptions),
JSON(JsonWriterOptions),
Avro(AvroWriterOptions),
Arrow(ArrowWriterOptions),
}
Expand description
This type contains all options needed to initialize a particular RecordBatchWriter type. Each element in the enum contains a thin wrapper around a “writer builder” type (e.g. arrow::csv::WriterBuilder) plus any DataFusion specific writing options (e.g. CSV compression)
Variants§
Parquet(ParquetWriterOptions)
CSV(CsvWriterOptions)
JSON(JsonWriterOptions)
Avro(AvroWriterOptions)
Arrow(ArrowWriterOptions)
Implementations§
source§impl FileTypeWriterOptions
impl FileTypeWriterOptions
sourcepub fn build(
file_type: &FileType,
config_defaults: &ConfigOptions,
statement_options: &StatementOptions
) -> Result<Self>
pub fn build( file_type: &FileType, config_defaults: &ConfigOptions, statement_options: &StatementOptions ) -> Result<Self>
Constructs a FileTypeWriterOptions given a FileType to be written and arbitrary String tuple options. May return an error if any string setting is unrecognized or unsupported.
sourcepub fn build_default(
file_type: &FileType,
config_defaults: &ConfigOptions
) -> Result<Self>
pub fn build_default( file_type: &FileType, config_defaults: &ConfigOptions ) -> Result<Self>
Constructs a FileTypeWriterOptions from session defaults only.
sourcepub fn try_into_parquet(&self) -> Result<&ParquetWriterOptions>
pub fn try_into_parquet(&self) -> Result<&ParquetWriterOptions>
Tries to extract ParquetWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from parquet is set.
sourcepub fn try_into_csv(&self) -> Result<&CsvWriterOptions>
pub fn try_into_csv(&self) -> Result<&CsvWriterOptions>
Tries to extract CsvWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from csv is set.
sourcepub fn try_into_json(&self) -> Result<&JsonWriterOptions>
pub fn try_into_json(&self) -> Result<&JsonWriterOptions>
Tries to extract JsonWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from json is set.
sourcepub fn try_into_avro(&self) -> Result<&AvroWriterOptions>
pub fn try_into_avro(&self) -> Result<&AvroWriterOptions>
Tries to extract AvroWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from avro is set.
sourcepub fn try_into_arrow(&self) -> Result<&ArrowWriterOptions>
pub fn try_into_arrow(&self) -> Result<&ArrowWriterOptions>
Tries to extract ArrowWriterOptions from this FileTypeWriterOptions enum. Returns an error if a different type from arrow is set.
Trait Implementations§
source§impl Clone for FileTypeWriterOptions
impl Clone for FileTypeWriterOptions
source§fn clone(&self) -> FileTypeWriterOptions
fn clone(&self) -> FileTypeWriterOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more