Class DynamoDbSinkBuilder<InputT>
- java.lang.Object
-
- org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,DynamoDbWriteRequest,DynamoDbSinkBuilder<InputT>>
-
- org.apache.flink.connector.dynamodb.sink.DynamoDbSinkBuilder<InputT>
-
- Type Parameters:
InputT- type of elements that should be persisted in the destination
@PublicEvolving public class DynamoDbSinkBuilder<InputT> extends org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,DynamoDbWriteRequest,DynamoDbSinkBuilder<InputT>>
Builder to constructDynamoDbSink.The following example shows the minimum setup to create a
DynamoDbSinkthat writes records into DynamoDb{@code private static class DummyDynamoDbElementConverter implements ElementConverter{
-
-
Constructor Summary
Constructors Constructor Description DynamoDbSinkBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamoDbSink<InputT>build()DynamoDbSinkBuilder<InputT>setDynamoDbProperties(Properties properties)DynamoDbSinkBuilder<InputT>setElementConverter(org.apache.flink.connector.base.sink.writer.ElementConverter<InputT,DynamoDbWriteRequest> elementConverter)DynamoDbSinkBuilder<InputT>setFailOnError(boolean failOnError)DynamoDbSinkBuilder<InputT>setMaxBatchSizeInBytes(long maxBatchSizeInBytes)DynamoDbSinkBuilder<InputT>setMaxRecordSizeInBytes(long maxRecordSizeInBytes)DynamoDbSinkBuilder<InputT>setOverwriteByPartitionKeys(List<String> overwriteByPartitionKeys)DynamoDbSinkBuilder<InputT>setTableName(String tableName)Table name for the DynamoDB sink.-
Methods inherited from class org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder
getMaxBatchSize, getMaxBatchSizeInBytes, getMaxBufferedRequests, getMaxInFlightRequests, getMaxRecordSizeInBytes, getMaxTimeInBufferMS, setMaxBatchSize, setMaxBufferedRequests, setMaxInFlightRequests, setMaxTimeInBufferMS
-
-
-
-
Method Detail
-
setDynamoDbProperties
public DynamoDbSinkBuilder<InputT> setDynamoDbProperties(Properties properties)
-
setElementConverter
public DynamoDbSinkBuilder<InputT> setElementConverter(org.apache.flink.connector.base.sink.writer.ElementConverter<InputT,DynamoDbWriteRequest> elementConverter)
-
setTableName
public DynamoDbSinkBuilder<InputT> setTableName(String tableName)
Table name for the DynamoDB sink.
-
setOverwriteByPartitionKeys
public DynamoDbSinkBuilder<InputT> setOverwriteByPartitionKeys(List<String> overwriteByPartitionKeys)
- Parameters:
overwriteByPartitionKeys- list of attribute key names for the sink to deduplicate on if you want to bypass the no duplication limitation of a single batch write request. Batching DynamoDB sink will drop request items in the buffer if their primary keys(composite) values are the same as the newly added ones. The newer request item in a single batch takes precedence.
-
setFailOnError
public DynamoDbSinkBuilder<InputT> setFailOnError(boolean failOnError)
-
setMaxBatchSizeInBytes
public DynamoDbSinkBuilder<InputT> setMaxBatchSizeInBytes(long maxBatchSizeInBytes)
- Overrides:
setMaxBatchSizeInBytesin classorg.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,DynamoDbWriteRequest,DynamoDbSinkBuilder<InputT>>
-
setMaxRecordSizeInBytes
public DynamoDbSinkBuilder<InputT> setMaxRecordSizeInBytes(long maxRecordSizeInBytes)
- Overrides:
setMaxRecordSizeInBytesin classorg.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,DynamoDbWriteRequest,DynamoDbSinkBuilder<InputT>>
-
build
public DynamoDbSink<InputT> build()
- Specified by:
buildin classorg.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,DynamoDbWriteRequest,DynamoDbSinkBuilder<InputT>>
-
-