Sink¶
Sink
is an extension of the Table
abstraction for streaming sinks that add the batch results of a streaming query in Micro-Batch Stream Processing.
Note
Sink
extends Table
interface for the only purpose of making it compatible with Data Source V2. All Table
methods simply throw an IllegalStateException
.
Contract¶
Adding Batch¶
addBatch(
batchId: Long,
data: DataFrame): Unit
Adds a batch of data to the sink
Used when MicroBatchExecution
stream execution engine is requested to add a batch to a sink (addBatch phase) (while running micro-batches of a streaming query)