DirectLoadTableAppendTruncateStreamLoader

class DirectLoadTableAppendTruncateStreamLoader(val stream: DestinationStream, initialStatus: DirectLoadInitialStatus, realTableName: TableName, tempTableName: TableName, columnNameMapping: ColumnNameMapping, schemaEvolutionClient: TableSchemaEvolutionClient, tableOperationsClient: TableOperationsClient, streamStateStore: StreamStateStore<DirectLoadTableExecutionConfig>) : StreamLoader

Stream loader implementation for append + truncate mode.

This loader combines append and truncate behaviors, allowing for overwriting data in the target table. It conditionally uses either a temporary table or the real table depending on generation IDs and initial status. When using a temporary table, it overwrites the real table with the temporary table's data during close.

Generation IDs are used to determine whether existing tables can be reused or need to be recreated to ensure data consistency.

Constructors

constructor(stream: DestinationStream, initialStatus: DirectLoadInitialStatus, realTableName: TableName, tempTableName: TableName, columnNameMapping: ColumnNameMapping, schemaEvolutionClient: TableSchemaEvolutionClient, tableOperationsClient: TableOperationsClient, streamStateStore: StreamStateStore<DirectLoadTableExecutionConfig>)

Properties

Link copied to clipboard
open override val stream: DestinationStream

Functions

Link copied to clipboard
open suspend override fun close(hadNonzeroRecords: Boolean, streamFailure: StreamProcessingFailed?)
Link copied to clipboard
open suspend override fun start()
Link copied to clipboard
open suspend fun teardown(completedSuccessfully: Boolean)