Git Product home page Git Product logo

flink-api-examples's Introduction

Flink API Examples for DataStream API and Table API

The Table API is not a new kid on the block. But the community has worked hard on reshaping its future. Today, it is one of the core abstractions in Flink next to the DataStream API. The Table API can deal with bounded and unbounded streams in a unified and highly optimized ecosystem inspired by databases and SQL. Various connectors and catalogs integrate with the outside world.

But this doesn't mean that the DataStream API will become obsolete any time soon. This repository demos what Table API is capable of today. We present how the API solves different scenarios:

  • as a batch processor,
  • a changelog processor,
  • a change data capture (CDC) hub,
  • or a streaming ETL tool

with many built-in functions and operators for deduplicating, joining, and aggregating data.

It shows hybrid pipelines in which both APIs interact in symbiosis and contribute their unique strengths.

How to Use This Repository

  1. Import this repository into your IDE (preferably IntelliJ IDEA). Select the pom.xml file during import to treat it as a Maven project. The project uses the latest Flink 1.15.

  2. All examples are runnable from the IDE. You simply need to execute the main() method of every example class.

  3. In order to make the examples run within IntelliJ IDEA, it is necessary to tick the Add dependencies with "provided" scope to classpath option in the run configuration under Modify options.

  4. For the Apache Kafka examples, download and unzip Apache Kafka. Start up Kafka and Zookeeper:

    ./bin/zookeeper-server-start.sh config/zookeeper.properties &
    
    ./bin/kafka-server-start.sh config/server.properties &
    

    Run FillKafkaWithCustomers and FillKafkaWithTransactions to create and fill the Kafka topics with Flink.

  5. For the MySQL CDC example, run StartMySqlContainer with an available Docker setup to set up a dummy database instance. FillMySqlWithValues provides a Flink job to update the database tables while the CDC example is running.

flink-api-examples's People

Contributors

twalthr 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.