Struct datafusion::execution::options::NdJsonReadOptions
source · pub struct NdJsonReadOptions<'a> {
pub schema: Option<SchemaRef>,
pub schema_infer_max_records: usize,
pub file_extension: &'a str,
pub table_partition_cols: Vec<String>,
pub file_compression_type: FileCompressionType,
}
Expand description
Options that control the reading of Line-delimited JSON files (NDJson)
Note this structure is supplied when a datasource is created and
can not not vary from statement to statement. For settings that
can vary statement to statement see
ConfigOptions
.
Fields
schema: Option<SchemaRef>
The data source schema.
schema_infer_max_records: usize
Max number of rows to read from JSON files for schema inference if needed. Defaults to DEFAULT_SCHEMA_INFER_MAX_RECORD
.
file_extension: &'a str
File extension; only files with this extension are selected for data input.
Defaults to FileType::JSON.get_ext().as_str()
.
table_partition_cols: Vec<String>
Partition Columns
file_compression_type: FileCompressionType
File compression type
Implementations
sourceimpl<'a> NdJsonReadOptions<'a>
impl<'a> NdJsonReadOptions<'a>
sourcepub fn table_partition_cols(self, table_partition_cols: Vec<String>) -> Self
pub fn table_partition_cols(self, table_partition_cols: Vec<String>) -> Self
Specify table_partition_cols for partition pruning
sourcepub fn file_extension(self, file_extension: &'a str) -> Self
pub fn file_extension(self, file_extension: &'a str) -> Self
Specify file_extension
sourcepub fn file_compression_type(
self,
file_compression_type: FileCompressionType
) -> Self
pub fn file_compression_type(
self,
file_compression_type: FileCompressionType
) -> Self
Specify file_compression_type
sourcepub fn to_listing_options(&self, target_partitions: usize) -> ListingOptions
pub fn to_listing_options(&self, target_partitions: usize) -> ListingOptions
Helper to convert these user facing options to ListingTable
options
Trait Implementations
sourceimpl<'a> Clone for NdJsonReadOptions<'a>
impl<'a> Clone for NdJsonReadOptions<'a>
sourcefn clone(&self) -> NdJsonReadOptions<'a>
fn clone(&self) -> NdJsonReadOptions<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl<'a> RefUnwindSafe for NdJsonReadOptions<'a>
impl<'a> Send for NdJsonReadOptions<'a>
impl<'a> Sync for NdJsonReadOptions<'a>
impl<'a> Unpin for NdJsonReadOptions<'a>
impl<'a> UnwindSafe for NdJsonReadOptions<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more