pub struct DataStreamWriter { /* private fields */ }
Expand description
DataStreamWriter provides the ability to output a StreamingQuery which can then be used to monitor the active stream
Implementations§
Source§impl DataStreamWriter
impl DataStreamWriter
Sourcepub fn new(dataframe: DataFrame) -> Self
pub fn new(dataframe: DataFrame) -> Self
Create a new DataStreamWriter from a provided streaming DataFrame
§Defaults
format
: None,output_mode
: OutputMode,query_name
: None,trigger
: Trigger,partition_by
: vec![],write_options
: HashMap::new()
Sourcepub fn format(self, format: &str) -> Self
pub fn format(self, format: &str) -> Self
Target format to output the StreamingQuery
Sourcepub fn output_mode(self, output_mode: OutputMode) -> Self
pub fn output_mode(self, output_mode: OutputMode) -> Self
Sourcepub fn partition_by<'a, I>(self, cols: I) -> Selfwhere
I: IntoIterator<Item = &'a str>,
pub fn partition_by<'a, I>(self, cols: I) -> Selfwhere
I: IntoIterator<Item = &'a str>,
Partitions the output by the given columns on the file system
Sourcepub fn option(self, key: &str, value: &str) -> Self
pub fn option(self, key: &str, value: &str) -> Self
Add an input option for the underlying data source
Sourcepub fn options<I, K, V>(self, options: I) -> Self
pub fn options<I, K, V>(self, options: I) -> Self
Set many input options based on an iterator of (key/value pairs) for the underlying data source
pub fn query_name(self, name: &str) -> Self
Sourcepub async fn start(
self,
path: Option<&str>,
) -> Result<StreamingQuery, SparkError>
pub async fn start( self, path: Option<&str>, ) -> Result<StreamingQuery, SparkError>
Start a streaming job to save the contents of the StreamingQuery to a data source.
The data source is specified by the format
and a set of options
.
Sourcepub async fn to_table(
self,
table_name: &str,
) -> Result<StreamingQuery, SparkError>
pub async fn to_table( self, table_name: &str, ) -> Result<StreamingQuery, SparkError>
Start a streaming job to save the contents of the StreamingQuery to a table.
Trait Implementations§
Source§impl Clone for DataStreamWriter
impl Clone for DataStreamWriter
Source§fn clone(&self) -> DataStreamWriter
fn clone(&self) -> DataStreamWriter
Returns a copy 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 Freeze for DataStreamWriter
impl !RefUnwindSafe for DataStreamWriter
impl Send for DataStreamWriter
impl Sync for DataStreamWriter
impl Unpin for DataStreamWriter
impl !UnwindSafe for DataStreamWriter
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request