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) -> Self
pub fn output_mode(self, mode: &str) -> Self
Set the output mode (“append”, “update”, “complete”).
Sourcepub fn format(self, source: &str) -> Self
pub fn format(self, source: &str) -> Self
Set the format/sink type (e.g., “parquet”, “json”, “csv”, “console”, “noop”, “kafka”).
Sourcepub fn partition_by(self, columns: Vec<&str>) -> Self
pub fn partition_by(self, columns: Vec<&str>) -> Self
Set partitioning columns.
Sourcepub fn cluster_by(self, columns: Vec<&str>) -> Self
pub fn cluster_by(self, columns: Vec<&str>) -> Self
Set clustering columns.
Sourcepub fn query_name(self, name: &str) -> Self
pub fn query_name(self, name: &str) -> Self
Set the query name.
Sourcepub fn foreach_batch(self, payload: PythonUDFPayload) -> Self
pub fn foreach_batch(self, payload: PythonUDFPayload) -> Self
Set a foreach batch function (PythonUDF payload).
Sourcepub fn foreach(self, payload: PythonUDFPayload) -> Self
pub fn foreach(self, payload: PythonUDFPayload) -> Self
Set a foreach function (PythonUDF payload).
Sourcepub fn start(self, path: &str) -> Result<StreamingQuery>
pub fn start(self, path: &str) -> Result<StreamingQuery>
Start the streaming query writing to a path, returning a StreamingQuery handle.
Sourcepub fn to_table(self, table_name: &str) -> Result<StreamingQuery>
pub fn to_table(self, table_name: &str) -> Result<StreamingQuery>
Start the streaming query writing to a table, returning a StreamingQuery handle.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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