Specify data source provider (e.g., "parquet", "orc", "iceberg", "delta")
Partition by columns. Note: Each call to partitionBy replaces previously set partition columns.
Cluster by columns (for data sources that support clustering). Note: Each call to clusterBy replaces previously set clustering columns.
Create new table
Replace existing table
Create or replace table
Append to existing table
Overwrite matching rows
Overwrite partitions
Interface used to write a DataFrame to external storage using V2 data sources. Provides advanced write operations (create, replace, append, overwrite) with better semantics than V1.
Use
DataFrame.writeTo(tableName)to access this.Stable
Since
1.0.0
See
https://spark.apache.org/docs/latest/sql-data-sources-v2.html