[][src]Struct arrow::json::reader::ReaderBuilder

pub struct ReaderBuilder { /* fields omitted */ }

JSON file reader builder

Implementations

impl ReaderBuilder[src]

pub fn new() -> Self[src]

Create a new builder for configuring JSON parsing options.

To convert a builder into a reader, call Reader::from_builder

Example

extern crate arrow;

use arrow::json;
use std::fs::File;

fn example() -> json::Reader<File> {
    let file = File::open("test/data/basic.json").unwrap();

    // create a builder, inferring the schema with the first 100 records
    let builder = json::ReaderBuilder::new().infer_schema(Some(100));

    let reader = builder.build::<File>(file).unwrap();

    reader
}

pub fn with_schema(self, schema: SchemaRef) -> Self[src]

Set the JSON file's schema

pub fn infer_schema(self, max_records: Option<usize>) -> Self[src]

Set the JSON reader to infer the schema of the file

pub fn with_batch_size(self, batch_size: usize) -> Self[src]

Set the batch size (number of records to load at one time)

pub fn with_projection(self, projection: Vec<String>) -> Self[src]

Set the reader's column projection

pub fn build<R: Read + Seek>(self, source: R) -> Result<Reader<R>>[src]

Create a new Reader from the ReaderBuilder

Trait Implementations

impl Debug for ReaderBuilder[src]

impl Default for ReaderBuilder[src]

Auto Trait Implementations

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