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>

source

pub fn new(dest_table: &'a str) -> Self

source

pub async fn build<'c>( &'a self, con: &'c mut ExaConnection ) -> Result<(BoxFuture<'c, Result<ExaQueryResult, Error>>, Vec<ExaImport>), SqlxError>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.

source

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.

source

pub fn buffer_size(&mut self, buffer_size: usize) -> &mut Self

source

pub fn columns(&mut self, columns: Option<&'a [&'a str]>) -> &mut Self

source

pub fn comment(&mut self, comment: &'a str) -> &mut Self

source

pub fn encoding(&mut self, encoding: &'a str) -> &mut Self

source

pub fn null(&mut self, null: &'a str) -> &mut Self

source

pub fn row_separator(&mut self, separator: RowSeparator) -> &mut Self

source

pub fn column_separator(&mut self, separator: &'a str) -> &mut Self

source

pub fn column_delimiter(&mut self, delimiter: &'a str) -> &mut Self

source

pub fn skip(&mut self, num: u64) -> &mut Self

source

pub fn trim(&mut self, trim: Trim) -> &mut Self

Trait Implementations§

source§

impl<'a> Clone for ImportBuilder<'a>

source§

fn clone(&self) -> ImportBuilder<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for ImportBuilder<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more