Write¶
Write
is an abstraction of writers.
Contract¶
Description¶
String description()
Defaults to the name of this Write
class
Used when:
Write
is requested to toBatch and toStreaming (for reporting purposes)
Supported CustomMetrics¶
CustomMetric[] supportedCustomMetrics()
Defaults to no CustomMetrics
Used when:
V2ExistingTableWriteExec
is requested for customMetricsStreamExecution
(Spark Structured Streaming) is requested for aStreamingWrite
Creating BatchWrite¶
BatchWrite toBatch()
BatchWrite of this connector
UnsupportedOperationException by default
toBatch
throws an UnsupportedOperationException
by default and is expected to be overriden by implementations.
[description]: Batch write is not supported
toBatch
should be implemented for Tables that create Write
s that reports BATCH_WRITE support in their capabilities.
See:
Used when:
V2ExistingTableWriteExec
physical command is executedTableWriteExecHelper
is requested to writeToTable
Creating StreamingWrite¶
StreamingWrite toStreaming()
toStreaming
throws an UnsupportedOperationException
by default:
[description]: Streaming write is not supported
toStreaming
should be implemented for Tables that create Write
s that reports STREAMING_WRITE support in their capabilities.
Used when:
StreamExecution
(Spark Structured Streaming) is requested for aStreamingWrite
Implementations¶
ConsoleTable
(Spark Structured Streaming)- WriteBuilder
- FileWrite
ForeachWrite
(Spark Structured Streaming)- KafkaWrite
MemoryWrite
(Spark Structured Streaming)NoopWrite
RequiresDistributionAndOrdering
V1Write