Write¶
Write is an abstraction of writers.
Contract¶
Description¶
String description()
Defaults to the name of this Write class
Used when:
Writeis requested to toBatch and toStreaming (for reporting purposes)
Supported CustomMetrics¶
CustomMetric[] supportedCustomMetrics()
Defaults to no CustomMetrics
Used when:
V2ExistingTableWriteExecis 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 Writes that reports BATCH_WRITE support in their capabilities.
See:
Used when:
V2ExistingTableWriteExecphysical command is executedTableWriteExecHelperis 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 Writes 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)NoopWriteRequiresDistributionAndOrderingV1Write