Giter Site home page Giter Site logo

flink-connector-dynamodb's Introduction

Flink Connector DynamoDB

Java library provides Apache Flink connector sink for AWS DynamoDB database that can be used with Flink 1.11.1 runtime version.

Build Status License Developed at Klarna

At Klarna we use streaming applications extensively. Amazon Kinesis Data Analytics with Flink 1.11.3 is starting to be one of the choices for the development of new streaming analytics applications at Klarna. Unfortunately, Apache Flink does not provide a connector sink for AWS DynamoDB database out of the box at the moment. This project is to solve this gap.

Usage example

final FlinkDynamoDBClientBuilder dynamoDBBuilder = new DynamoDBBuilder() {
    @Override
    public DynamoDBClient build() {
        return DynamoDBClient.builder().withRegion(Region.EU_WEST_1).build();
    }
};

final DynamoDBSinkWriteRequestMapper<String> mapper = new DynamoDBSinkWriteRequestMapper<>() {
    @Override
    public WriteRequest map(String in) {
        return WriteRequest.builder().putRequest(PutRequest.builder().build());
    }
};

final DynamoDBSinkConfig dynamoDBSinkConfig = DynamoDBSinkBaseConfig.builder()
    .batchSize(25)
    .queueLimit(10)
    .build();

final FlinkDynamoDBSink<String> dynamoDbSink = new FlinkDynamoDBSink<>(
        dynamoDBBuilder,
        "table_name"
        dynamoDBSinkConfig,
        mapper
);

env.addSource(createKafkaConsumer())
        .addSink(dynamoDbSink)
        .execute();

Development setup

This project is available from Maven Central Repository.

Maven

<dependency>
    <groupId>com.klarna</groupId>
    <artifactId>flink-connector-dynamodb</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle

implementation com.klarna:flink-connector-dynamodb:1.0.0

How to contribute

See our guide on contributing.

Release History

See our changelog.

License

Copyright © 2020 Klarna Bank AB

For license details, see the LICENSE file in the root of this project.

flink-connector-dynamodb's People

Contributors

nirtsruya avatar arianrohani avatar rk13 avatar robinpokorny avatar dependabot[bot] avatar snyk-bot avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.