Write¶
Write is an abstraction of writers.
Contract¶
Description¶
Defaults to the name of this Write class
Used when:
Writeis requested to toBatch and toStreaming (for reporting purposes)
Supported CustomMetrics¶
Defaults to no CustomMetrics
Used when:
V2ExistingTableWriteExecis requested for customMetricsStreamExecution(Spark Structured Streaming) is requested for aStreamingWrite
Creating BatchWrite¶
BatchWrite of this connector
UnsupportedOperationException by default
toBatch throws an UnsupportedOperationException by default and is expected to be overriden by implementations.
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¶
toStreaming throws an UnsupportedOperationException by default:
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