[][src]Struct datafusion::physical_plan::csv::CsvReadOptions

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]

pub fn new() -> Self[src]

Create a CSV read option with default presets

pub fn has_header(mut self: Self, has_header: bool) -> Self[src]

Configure has_header setting

pub fn delimiter(mut self: Self, delimiter: u8) -> Self[src]

Specify delimiter to use for CSV read

pub fn file_extension(mut self: Self, file_extension: &'a str) -> Self[src]

Specify the file extension for CSV file selection

pub fn delimiter_option(mut self: Self, delimiter: Option<u8>) -> Self[src]

Configure delimiter setting with Option, None value will be ignored

pub fn schema(mut self: Self, schema: &'a Schema) -> Self[src]

Specify schema to use for CSV read

pub fn schema_infer_max_records(mut self: 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>[src]

impl<'a> Send for CsvReadOptions<'a>[src]

impl<'a> Sync for CsvReadOptions<'a>[src]

impl<'a> Unpin for CsvReadOptions<'a>[src]

impl<'a> UnwindSafe for CsvReadOptions<'a>[src]

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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>,