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


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”.


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> Copy for CsvReadOptions<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for CsvReadOptions<'a>

impl<'a> Send for CsvReadOptions<'a>

impl<'a> Sync for CsvReadOptions<'a>

impl<'a> Unpin for CsvReadOptions<'a>

impl<'a> UnwindSafe for CsvReadOptions<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,