DataFrameWriter
Saves the contents of a DataFrame to external storage systems (e.g. file systems, key-value stores, tables). Use Dataset.write to access this.
Mirrors the public surface of org.apache.spark.sql.DataFrameWriter over the Spark Connect protocol.
Attributes
- Example
-
df.write.format("parquet").mode("overwrite").save("out.parquet") df.write.mode("append").saveAsTable("my_table") - Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Buckets the output by the given columns into numBuckets buckets. If specified, the output is laid out on the file system similar to Hive's bucketing scheme.
Buckets the output by the given columns into numBuckets buckets. If specified, the output is laid out on the file system similar to Hive's bucketing scheme.
Attributes
- Returns
-
this writer, for chaining.
Saves the content as CSV at the given path.
Saves the content as CSV at the given path.
Attributes
Specifies the output data source format (e.g. "csv", "json", "parquet", "orc").
Specifies the output data source format (e.g. "csv", "json", "parquet", "orc").
Attributes
- Returns
-
this writer, for chaining.
Saves the content as JSON at the given path.
Saves the content as JSON at the given path.
Attributes
Adds an output option for the underlying data source.
Adds an output option for the underlying data source.
Attributes
- Returns
-
this writer, for chaining.
Adds a boolean output option. @return this writer, for chaining.
Adds a boolean output option. @return this writer, for chaining.
Attributes
Adds a long output option. @return this writer, for chaining.
Adds a long output option. @return this writer, for chaining.
Attributes
Adds a double output option. @return this writer, for chaining.
Adds a double output option. @return this writer, for chaining.
Attributes
Adds multiple output options.
Adds multiple output options.
Attributes
- Returns
-
this writer, for chaining.
Saves the content as ORC at the given path.
Saves the content as ORC at the given path.
Attributes
Saves the content as Parquet at the given path.
Saves the content as Parquet at the given path.
Attributes
Partitions the output by the given columns on the file system.
Partitions the output by the given columns on the file system.
Attributes
- Returns
-
this writer, for chaining.
Sorts the output in each bucket by the given columns.
Sorts the output in each bucket by the given columns.
Attributes
- Returns
-
this writer, for chaining.
Saves the content as text at the given path.
Saves the content as text at the given path.