@Evolving
public interface WriteBuilder
BatchWrite
. Implementations can mix in some interfaces to
support different ways to write data to data sources.
Unless modified by a mixin interface, the BatchWrite
configured by this builder is to
append data without affecting existing data.Modifier and Type | Method and Description |
---|---|
default BatchWrite |
buildForBatch()
Returns a
BatchWrite to write data to batch source. |
default StreamingWrite |
buildForStreaming()
Returns a
StreamingWrite to write data to streaming source. |
default WriteBuilder |
withInputDataSchema(StructType schema)
Passes the schema of the input data from Spark to data source.
|
default WriteBuilder |
withQueryId(String queryId)
Passes the `queryId` from Spark to data source.
|
default WriteBuilder withQueryId(String queryId)
BatchWrite
can use this id to identify the query.default WriteBuilder withInputDataSchema(StructType schema)
default BatchWrite buildForBatch()
BatchWrite
to write data to batch source. By default this method throws
exception, data sources must overwrite this method to provide an implementation, if the
Table
that creates this write returns TableCapability.BATCH_WRITE
support in
its Table.capabilities()
.default StreamingWrite buildForStreaming()
StreamingWrite
to write data to streaming source. By default this method
throws exception, data sources must overwrite this method to provide an implementation, if the
Table
that creates this write returns TableCapability.STREAMING_WRITE
support
in its Table.capabilities()
.