public static class FlinkSink.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
org.apache.flink.streaming.api.datastream.DataStreamSink<org.apache.flink.table.data.RowData> |
build() |
FlinkSink.Builder |
distributionMode(DistributionMode mode)
Configure the write
DistributionMode that the flink sink will use. |
FlinkSink.Builder |
equalityFieldColumns(java.util.List<java.lang.String> columns)
Configuring the equality field columns for iceberg table that accept CDC or UPSERT events.
|
FlinkSink.Builder |
overwrite(boolean newOverwrite) |
FlinkSink.Builder |
table(Table newTable)
|
FlinkSink.Builder |
tableLoader(TableLoader newTableLoader)
The table loader is used for loading tables in
IcebergFilesCommitter lazily, we need this loader because
Table is not serializable and could not just use the loaded table from Builder#table in the remote task
manager. |
FlinkSink.Builder |
tableSchema(org.apache.flink.table.api.TableSchema newTableSchema) |
FlinkSink.Builder |
writeParallelism(int newWriteParallelism)
Configuring the write parallel number for iceberg stream writer.
|
public FlinkSink.Builder table(Table newTable)
Table
instance is used for initializing IcebergStreamWriter
which will write all
the records into DataFile
s and emit them to downstream operator. Providing a table would avoid so many
table loading from each separate task.newTable
- the loaded iceberg table instance.FlinkSink.Builder
to connect the iceberg table.public FlinkSink.Builder tableLoader(TableLoader newTableLoader)
IcebergFilesCommitter
lazily, we need this loader because
Table
is not serializable and could not just use the loaded table from Builder#table in the remote task
manager.newTableLoader
- to load iceberg table inside tasks.FlinkSink.Builder
to connect the iceberg table.public FlinkSink.Builder tableSchema(org.apache.flink.table.api.TableSchema newTableSchema)
public FlinkSink.Builder overwrite(boolean newOverwrite)
public FlinkSink.Builder distributionMode(DistributionMode mode)
DistributionMode
that the flink sink will use. Currently, flink support
DistributionMode.NONE
and DistributionMode.HASH
.mode
- to specify the write distribution mode.FlinkSink.Builder
to connect the iceberg table.public FlinkSink.Builder writeParallelism(int newWriteParallelism)
newWriteParallelism
- the number of parallel iceberg stream writer.FlinkSink.Builder
to connect the iceberg table.public FlinkSink.Builder equalityFieldColumns(java.util.List<java.lang.String> columns)
columns
- defines the iceberg table's key.FlinkSink.Builder
to connect the iceberg table.public org.apache.flink.streaming.api.datastream.DataStreamSink<org.apache.flink.table.data.RowData> build()