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>>
DynamoDbSink.
The following example shows the minimum setup to create a DynamoDbSink that writes
records into DynamoDb
{@code
private static class DummyDynamoDbElementConverter
implements ElementConverter { | Constructor and Description |
|---|
DynamoDbSinkBuilder() |
| Modifier and Type | Method and 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.
|
getMaxBatchSize, getMaxBatchSizeInBytes, getMaxBufferedRequests, getMaxInFlightRequests, getMaxRecordSizeInBytes, getMaxTimeInBufferMS, setMaxBatchSize, setMaxBufferedRequests, setMaxInFlightRequests, setMaxTimeInBufferMSpublic DynamoDbSinkBuilder<InputT> setDynamoDbProperties(Properties properties)
public DynamoDbSinkBuilder<InputT> setElementConverter(org.apache.flink.connector.base.sink.writer.ElementConverter<InputT,DynamoDbWriteRequest> elementConverter)
public DynamoDbSinkBuilder<InputT> setTableName(String tableName)
public DynamoDbSinkBuilder<InputT> setOverwriteByPartitionKeys(List<String> overwriteByPartitionKeys)
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.public DynamoDbSinkBuilder<InputT> setFailOnError(boolean failOnError)
public DynamoDbSinkBuilder<InputT> setMaxBatchSizeInBytes(long maxBatchSizeInBytes)
setMaxBatchSizeInBytes in class org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,DynamoDbWriteRequest,DynamoDbSinkBuilder<InputT>>public DynamoDbSinkBuilder<InputT> setMaxRecordSizeInBytes(long maxRecordSizeInBytes)
setMaxRecordSizeInBytes in class org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,DynamoDbWriteRequest,DynamoDbSinkBuilder<InputT>>public DynamoDbSink<InputT> build()
build in class org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,DynamoDbWriteRequest,DynamoDbSinkBuilder<InputT>>Copyright © 2022–2023 The Apache Software Foundation. All rights reserved.