pub struct ExportBuilder<'a> { /* private fields */ }etl only.Expand description
A builder for an ETL EXPORT job.
This builder allows configuring various options for the EXPORT job, such as the source,
number of readers, and CSV formatting options.
Once configured, the ExportBuilder::build method will create the EXPORT query and return
a tuple containing the EtlQuery future and a Vec<ExaReader> of workers. The future
must be awaited to drive the job to completion, while the workers are used to read the exported
data.
Implementations§
Source§impl<'a> ExportBuilder<'a>
impl<'a> ExportBuilder<'a>
pub fn new_from_query(query: &'a str) -> ExportBuilder<'a>
pub fn new_from_table( name: &'a str, schema: Option<&'a str>, ) -> ExportBuilder<'a>
Sourcepub async fn build<'c>(
&'a self,
con: &'c mut ExaConnection,
) -> Result<(EtlQuery<'c>, Vec<ExaExport>), Error>where
'c: 'a,
pub async fn build<'c>(
&'a self,
con: &'c mut ExaConnection,
) -> Result<(EtlQuery<'c>, Vec<ExaExport>), Error>where
'c: 'a,
Builds the EXPORT job.
The output will be a future to await the result of the EXPORT query and the workers that
can be used for ETL IO.
§Errors
Returns an error if getting the nodes IPs from Exasol fails or if the worker sockets could not be connected.
Sourcepub fn num_readers(&mut self, num_readers: usize) -> &mut ExportBuilder<'a>
pub fn num_readers(&mut self, num_readers: usize) -> &mut ExportBuilder<'a>
Sets the number of reader 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 compression(&mut self, enabled: bool) -> &mut ExportBuilder<'a>
compression only.pub fn comment(&mut self, comment: &'a str) -> &mut ExportBuilder<'a>
pub fn encoding(&mut self, encoding: &'a str) -> &mut ExportBuilder<'a>
pub fn null(&mut self, null: &'a str) -> &mut ExportBuilder<'a>
pub fn row_separator( &mut self, separator: RowSeparator, ) -> &mut ExportBuilder<'a>
pub fn column_separator(&mut self, separator: &'a str) -> &mut ExportBuilder<'a>
pub fn column_delimiter(&mut self, delimiter: &'a str) -> &mut ExportBuilder<'a>
pub fn with_column_names(&mut self, flag: bool) -> &mut ExportBuilder<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ExportBuilder<'a>
impl<'a> RefUnwindSafe for ExportBuilder<'a>
impl<'a> Send for ExportBuilder<'a>
impl<'a> Sync for ExportBuilder<'a>
impl<'a> Unpin for ExportBuilder<'a>
impl<'a> UnwindSafe for ExportBuilder<'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
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> ⓘ
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> ⓘ
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