Struct spark_connect_core::streaming::DataStreamWriter
source · 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 outputMode(self, outputMode: OutputMode) -> Self
pub fn outputMode(self, outputMode: OutputMode) -> Self
sourcepub fn partitionBy<'a, I>(self, cols: I) -> Selfwhere
I: IntoIterator<Item = &'a str>,
pub fn partitionBy<'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 queryName(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 toTable(
self,
tableName: &str
) -> Result<StreamingQuery, SparkError>
pub async fn toTable( self, tableName: &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> 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