pub struct ImportBuilder<'a> { /* private fields */ }
Expand description
A builder for an ETL IMPORT job.
Calling [build().await
] will ouput a future that drives the IMPORT query execution and a
Vec<ExaWriter>
which must be concurrently used to ingest data into Exasol.
Implementations§
Source§impl<'a> ImportBuilder<'a>
impl<'a> ImportBuilder<'a>
pub fn new(dest_table: &'a str) -> Self
Sourcepub async fn build<'c>(
&'a self,
con: &'c mut ExaConnection,
) -> Result<(BoxFuture<'c, Result<ExaQueryResult>>, Vec<ExaImport>)>where
'c: 'a,
pub async fn build<'c>(
&'a self,
con: &'c mut ExaConnection,
) -> Result<(BoxFuture<'c, Result<ExaQueryResult>>, Vec<ExaImport>)>where
'c: 'a,
Builds the IMPORT job.
This implies submitting the IMPORT query. The output will be a future to await the result of the job and the workers that can be used for ETL IO.
§Errors
Returns an error if the job could not be built and submitted.
Sourcepub fn num_writers(&mut self, num_writers: usize) -> &mut Self
pub fn num_writers(&mut self, num_writers: usize) -> &mut Self
Sets the number of writer jobs that will be started.
If set to 0
, then as many as possible will be used (one per node). Providing a number
bigger than the number of nodes is the same as providing 0
.
pub fn buffer_size(&mut self, buffer_size: usize) -> &mut Self
pub fn compression(&mut self, enabled: bool) -> &mut Self
pub fn columns(&mut self, columns: Option<&'a [&'a str]>) -> &mut Self
pub fn comment(&mut self, comment: &'a str) -> &mut Self
pub fn encoding(&mut self, encoding: &'a str) -> &mut Self
pub fn null(&mut self, null: &'a str) -> &mut Self
pub fn row_separator(&mut self, separator: RowSeparator) -> &mut Self
pub fn column_separator(&mut self, separator: &'a str) -> &mut Self
pub fn column_delimiter(&mut self, delimiter: &'a str) -> &mut Self
pub fn skip(&mut self, num: u64) -> &mut Self
pub fn trim(&mut self, trim: Trim) -> &mut Self
Trait Implementations§
Source§impl<'a> Clone for ImportBuilder<'a>
impl<'a> Clone for ImportBuilder<'a>
Source§fn clone(&self) -> ImportBuilder<'a>
fn clone(&self) -> ImportBuilder<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for ImportBuilder<'a>
impl<'a> RefUnwindSafe for ImportBuilder<'a>
impl<'a> Send for ImportBuilder<'a>
impl<'a> Sync for ImportBuilder<'a>
impl<'a> Unpin for ImportBuilder<'a>
impl<'a> UnwindSafe for ImportBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more