pub struct DataFrameWriter { /* private fields */ }Expand description
DataFrameWriter for writing DataFrames to various destinations.
Mirrors pyspark.sql.connect.readwriter.DataFrameWriter.
Implementations§
Source§impl DataFrameWriter
impl DataFrameWriter
Sourcepub fn cluster_by<S>(self, cols: impl IntoIterator<Item = S>) -> DataFrameWriter
pub fn cluster_by<S>(self, cols: impl IntoIterator<Item = S>) -> DataFrameWriter
Cluster the output by the given columns (liquid clustering).
Sourcepub fn mode(self, mode: &str) -> DataFrameWriter
pub fn mode(self, mode: &str) -> DataFrameWriter
Set the save mode.
Sourcepub fn format(self, source: &str) -> DataFrameWriter
pub fn format(self, source: &str) -> DataFrameWriter
Set the format/source type.
Sourcepub fn option(self, key: &str, value: &str) -> DataFrameWriter
pub fn option(self, key: &str, value: &str) -> DataFrameWriter
Set a single option.
Sourcepub fn options(self, options: HashMap<String, String>) -> DataFrameWriter
pub fn options(self, options: HashMap<String, String>) -> DataFrameWriter
Set multiple options.
Sourcepub fn partition_by<S>(
self,
cols: impl IntoIterator<Item = S>,
) -> DataFrameWriter
pub fn partition_by<S>( self, cols: impl IntoIterator<Item = S>, ) -> DataFrameWriter
Set the partition columns.
Sourcepub fn bucket_by<S>(
self,
num_buckets: i32,
cols: impl IntoIterator<Item = S>,
) -> DataFrameWriter
pub fn bucket_by<S>( self, num_buckets: i32, cols: impl IntoIterator<Item = S>, ) -> DataFrameWriter
Set the bucketing specification.
Sourcepub fn sort_by<S>(self, cols: impl IntoIterator<Item = S>) -> DataFrameWriter
pub fn sort_by<S>(self, cols: impl IntoIterator<Item = S>) -> DataFrameWriter
Set the sort columns.
Sourcepub fn save(self, path: Option<&str>) -> Result<(), SparkError>
pub fn save(self, path: Option<&str>) -> Result<(), SparkError>
Save the DataFrame to a file path (or to a path-less sink such as noop).
Sourcepub fn save_as_table(self, table_name: &str) -> Result<(), SparkError>
pub fn save_as_table(self, table_name: &str) -> Result<(), SparkError>
Save the DataFrame as a managed table.
Sourcepub fn insert_into(self, table_name: &str) -> Result<(), SparkError>
pub fn insert_into(self, table_name: &str) -> Result<(), SparkError>
Insert the DataFrame into an existing table.
Trait Implementations§
Source§impl DataFrameWriterExt for DataFrameWriter
impl DataFrameWriterExt for DataFrameWriter
Source§fn save_async(
self,
path: Option<&str>,
) -> impl Future<Output = Result<()>> + Send + 'static
fn save_async( self, path: Option<&str>, ) -> impl Future<Output = Result<()>> + Send + 'static
Async
DataFrameWriter::save.Source§fn save_as_table_async(
self,
table_name: &str,
) -> impl Future<Output = Result<()>> + Send + 'static
fn save_as_table_async( self, table_name: &str, ) -> impl Future<Output = Result<()>> + Send + 'static
Source§fn insert_into_async(
self,
table_name: &str,
) -> impl Future<Output = Result<()>> + Send + 'static
fn insert_into_async( self, table_name: &str, ) -> impl Future<Output = Result<()>> + Send + 'static
Async
DataFrameWriter::insert_into.Source§fn csv_async(
self,
path: &str,
) -> impl Future<Output = Result<()>> + Send + 'static
fn csv_async( self, path: &str, ) -> impl Future<Output = Result<()>> + Send + 'static
Async
DataFrameWriter::csv.Source§fn json_async(
self,
path: &str,
) -> impl Future<Output = Result<()>> + Send + 'static
fn json_async( self, path: &str, ) -> impl Future<Output = Result<()>> + Send + 'static
Async
DataFrameWriter::json.Source§fn orc_async(
self,
path: &str,
) -> impl Future<Output = Result<()>> + Send + 'static
fn orc_async( self, path: &str, ) -> impl Future<Output = Result<()>> + Send + 'static
Async
DataFrameWriter::orc.Source§fn parquet_async(
self,
path: &str,
) -> impl Future<Output = Result<()>> + Send + 'static
fn parquet_async( self, path: &str, ) -> impl Future<Output = Result<()>> + Send + 'static
Async
DataFrameWriter::parquet.Source§fn text_async(
self,
path: &str,
) -> impl Future<Output = Result<()>> + Send + 'static
fn text_async( self, path: &str, ) -> impl Future<Output = Result<()>> + Send + 'static
Async
DataFrameWriter::text.Auto Trait Implementations§
impl !Freeze for DataFrameWriter
impl !RefUnwindSafe for DataFrameWriter
impl !UnwindSafe for DataFrameWriter
impl Send for DataFrameWriter
impl Sync for DataFrameWriter
impl Unpin for DataFrameWriter
impl UnsafeUnpin for DataFrameWriter
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