Struct datafusion::physical_plan::csv::CsvReadOptions [−][src]
pub struct CsvReadOptions<'a> { pub has_header: bool, pub delimiter: u8, pub schema: Option<&'a Schema>, pub schema_infer_max_records: usize, pub file_extension: &'a str, }
CSV file read option
Fields
has_header: bool
Does the CSV file have a header?
If schema inference is run on a file with no headers, default column names are created.
delimiter: u8
An optional column delimiter. Defaults to b','
.
schema: Option<&'a Schema>
An optional schema representing the CSV files. If None, CSV reader will try to infer it based on data in file.
schema_infer_max_records: usize
Max number of rows to read from CSV files for schema inference if needed. Defaults to 1000.
file_extension: &'a str
File extension; only files with this extension are selected for data input. Defaults to “.csv”.
Implementations
impl<'a> CsvReadOptions<'a>
[src]
impl<'a> CsvReadOptions<'a>
[src]pub fn new() -> Self
[src]
Create a CSV read option with default presets
pub fn has_header(self, has_header: bool) -> Self
[src]
Configure has_header setting
pub fn delimiter(self, delimiter: u8) -> Self
[src]
Specify delimiter to use for CSV read
pub fn file_extension(self, file_extension: &'a str) -> Self
[src]
Specify the file extension for CSV file selection
pub fn delimiter_option(self, delimiter: Option<u8>) -> Self
[src]
Configure delimiter setting with Option, None value will be ignored
pub fn schema(self, schema: &'a Schema) -> Self
[src]
Specify schema to use for CSV read
pub fn schema_infer_max_records(self, max_records: usize) -> Self
[src]
Configure number of max records to read for schema inference
Trait Implementations
impl<'a> Clone for CsvReadOptions<'a>
[src]
impl<'a> Clone for CsvReadOptions<'a>
[src]fn clone(&self) -> CsvReadOptions<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for CsvReadOptions<'a>
[src]
impl<'a> Copy for CsvReadOptions<'a>
[src]Auto Trait Implementations
impl<'a> RefUnwindSafe for CsvReadOptions<'a>
impl<'a> RefUnwindSafe for CsvReadOptions<'a>
impl<'a> Send for CsvReadOptions<'a>
impl<'a> Send for CsvReadOptions<'a>
impl<'a> Sync for CsvReadOptions<'a>
impl<'a> Sync for CsvReadOptions<'a>
impl<'a> Unpin for CsvReadOptions<'a>
impl<'a> Unpin for CsvReadOptions<'a>
impl<'a> UnwindSafe for CsvReadOptions<'a>
impl<'a> UnwindSafe for CsvReadOptions<'a>