Package dev.vortex.spark.write
Class VortexWriteBuilder
java.lang.Object
dev.vortex.spark.write.VortexWriteBuilder
- All Implemented Interfaces:
org.apache.spark.sql.connector.write.SupportsTruncate,org.apache.spark.sql.connector.write.WriteBuilder
public final class VortexWriteBuilder
extends Object
implements org.apache.spark.sql.connector.write.WriteBuilder, org.apache.spark.sql.connector.write.SupportsTruncate
Builder for configuring Vortex write operations.
This class is responsible for creating BatchWrite instances that execute the actual write operations to create Vortex files from Spark DataFrames.
-
Constructor Summary
ConstructorsConstructorDescriptionVortexWriteBuilder(String paths, org.apache.spark.sql.connector.write.LogicalWriteInfo writeInfo, Map<String, String> options) Creates a new VortexWriteBuilder. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.spark.sql.connector.write.WriteBuilder
buildForBatch, buildForStreaming
-
Constructor Details
-
VortexWriteBuilder
public VortexWriteBuilder(String paths, org.apache.spark.sql.connector.write.LogicalWriteInfo writeInfo, Map<String, String> options) Creates a new VortexWriteBuilder.- Parameters:
paths- root path for writewriteInfo- logical information about the write operationoptions- additional write options
-
-
Method Details
-
build
public org.apache.spark.sql.connector.write.Write build()Builds a Write for executing the write operation.- Specified by:
buildin interfaceorg.apache.spark.sql.connector.write.WriteBuilder- Returns:
- a new VortexBatchWrite configured with this builder's settings
-
truncate
public org.apache.spark.sql.connector.write.WriteBuilder truncate()Configures the write operation to truncate existing data.When truncate is enabled, existing Vortex files at the output path will be removed before writing new data.
- Specified by:
truncatein interfaceorg.apache.spark.sql.connector.write.SupportsTruncate- Returns:
- this builder for method chaining
-