pub struct DataStreamWriter { /* private fields */ }Expand description
DataStreamWriter for writing streaming data to various sinks.
Mirrors pyspark.sql.connect.streaming.DataStreamWriter.
Implementations§
Source§impl DataStreamWriter
impl DataStreamWriter
Sourcepub fn output_mode(self, mode: &str) -> DataStreamWriter
pub fn output_mode(self, mode: &str) -> DataStreamWriter
Set the output mode (“append”, “update”, “complete”).
Sourcepub fn format(self, source: &str) -> DataStreamWriter
pub fn format(self, source: &str) -> DataStreamWriter
Set the format/sink type (e.g., “parquet”, “json”, “csv”, “console”, “noop”, “kafka”).
Sourcepub fn option(self, key: &str, value: &str) -> DataStreamWriter
pub fn option(self, key: &str, value: &str) -> DataStreamWriter
Set a single option key-value pair.
Sourcepub fn options(self, options: HashMap<String, String>) -> DataStreamWriter
pub fn options(self, options: HashMap<String, String>) -> DataStreamWriter
Set multiple options.
Sourcepub fn partition_by(self, columns: Vec<&str>) -> DataStreamWriter
pub fn partition_by(self, columns: Vec<&str>) -> DataStreamWriter
Set partitioning columns.
Sourcepub fn cluster_by(self, columns: Vec<&str>) -> DataStreamWriter
pub fn cluster_by(self, columns: Vec<&str>) -> DataStreamWriter
Set clustering columns.
Sourcepub fn query_name(self, name: &str) -> DataStreamWriter
pub fn query_name(self, name: &str) -> DataStreamWriter
Set the query name.
Sourcepub fn trigger(self, trigger: Trigger) -> DataStreamWriter
pub fn trigger(self, trigger: Trigger) -> DataStreamWriter
Set the trigger type.
Sourcepub fn foreach_batch(self, payload: PythonUDFPayload) -> DataStreamWriter
pub fn foreach_batch(self, payload: PythonUDFPayload) -> DataStreamWriter
Set a foreach batch function (PythonUDF payload).
Sourcepub fn foreach(self, payload: PythonUDFPayload) -> DataStreamWriter
pub fn foreach(self, payload: PythonUDFPayload) -> DataStreamWriter
Set a foreach function (PythonUDF payload).
Sourcepub fn start(self, path: &str) -> Result<StreamingQuery, SparkError>
pub fn start(self, path: &str) -> Result<StreamingQuery, SparkError>
Start the streaming query writing to a path, returning a StreamingQuery handle.
Sourcepub fn to_table(self, table_name: &str) -> Result<StreamingQuery, SparkError>
pub fn to_table(self, table_name: &str) -> Result<StreamingQuery, SparkError>
Start the streaming query writing to a table, returning a StreamingQuery handle.
Trait Implementations§
Source§impl DataStreamWriterExt for DataStreamWriter
impl DataStreamWriterExt for DataStreamWriter
Source§fn start_async(
self,
path: &str,
) -> impl Future<Output = Result<StreamingQuery>> + Send + 'static
fn start_async( self, path: &str, ) -> impl Future<Output = Result<StreamingQuery>> + Send + 'static
Async
DataStreamWriter::start.Source§fn to_table_async(
self,
table_name: &str,
) -> impl Future<Output = Result<StreamingQuery>> + Send + 'static
fn to_table_async( self, table_name: &str, ) -> impl Future<Output = Result<StreamingQuery>> + Send + 'static
Async
DataStreamWriter::to_table.Auto Trait Implementations§
impl !Freeze for DataStreamWriter
impl !RefUnwindSafe for DataStreamWriter
impl !UnwindSafe for DataStreamWriter
impl Send for DataStreamWriter
impl Sync for DataStreamWriter
impl Unpin for DataStreamWriter
impl UnsafeUnpin 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