Retour au classement

Flink CDC is a streaming data integration tool

change-data-capturecdcbatchdata-integrationdata-pipelinedistributedeltetlflinkkafkamysqlpaimon
Croissance des étoiles
Étoiles
6.4k
Forks
2.2k
Croissance hebdomadaire
Issues
1
2k4k6k
juil. 2020juil. 2022juil. 2024juil. 2026
ArtefactsMavengit clone https://github.com/apache/flink-cdc.git
README

Flink CDC

Test Release Build Nightly Build License

Flink CDC is a distributed data integration tool for real-time data and batch data, built on top of Apache Flink. It prioritizes efficient end-to-end data integration and offers enhanced functionalities such as full database synchronization, sharding table synchronization, schema evolution and data transformation.

Flink CDC framework design

API Layers

Flink CDC provides three API layers for different usage scenarios:

1. YAML API (Pipeline API)

The YAML API provides a declarative, zero-code approach to define data pipelines. Users describe the source, sink, routing, transformation, and schema evolution rules in a YAML file and submit it via the flink-cdc.sh CLI.

Please refer to the Quickstart Guide for detailed setup instructions.

source:
  type: mysql
  hostname: localhost
  port: 3306
  username: root
  password: 123456
  tables: app_db.\.*

sink:
  type: doris
  fenodes: 127.0.0.1:8030
  username: root
  password: ""

# Transform data on-the-fly
transform:
  - source-table: app_db.orders
    projection: id, order_id, UPPER(product_name) as product_name
    filter: id > 10 AND order_id > 100
    
# Route source tables to different sink tables
route:
  - source-table: app_db.orders
    sink-table: ods_db.ods_orders
  - source-table: app_db.shipments
    sink-table: ods_db.ods_shipments
  - source-table: app_db.\.*
    sink-table: ods_db.others

pipeline:
  name: Sync MySQL Database to Doris
  parallelism: 2
  schema.change.behavior: evolve  # Support schema evolution

Pipeline connectors:

Doris | Elasticsearch | Fluss | Hudi | Iceberg | Kafka | MaxCompute | MySQL | OceanBase | Oracle | Paimon | PostgreSQL | StarRocks

See the connector overview for a full list and configurations.

2. SQL API (Table/SQL API)

The SQL API integrates with Flink SQL, allowing users to define CDC sources using SQL DDL statements. Deploy the SQL connector JAR to FLINK_HOME/lib/ and use it directly in Flink SQL Client:

CREATE TABLE mysql_binlog (
  id INT NOT NULL,
  name STRING,
  description STRING,
  weight DECIMAL(10,3),
  PRIMARY KEY(id) NOT ENFORCED
) WITH (
  'connector' = 'mysql-cdc',
  'hostname' = 'localhost',
  'port' = '3306',
  'username' = 'flinkuser',
  'password' = 'flinkpw',
  'database-name' = 'inventory',
  'table-name' = 'products'
);

SELECT id, UPPER(name), description, weight FROM mysql_binlog;

Available SQL connectors (dependencies bundled):

MySQL | PostgreSQL | Oracle | SQL Server | MongoDB | OceanBase | TiDB | Db2 | Vitess

See the source connector overview for a full list and configurations.

3. DataStream API

The DataStream API provides programmatic access for building custom Flink streaming applications. Add the corresponding connector as a Maven dependency:

<dependency>
  <groupId>org.apache.flink</groupId>
  <artifactId>flink-connector-mysql-cdc</artifactId>
  <version>${flink-cdc.version}</version>
</dependency>

Available source connectors:

MySQL | PostgreSQL | Oracle | SQL Server | MongoDB | OceanBase | TiDB | Db2 | Vitess

All artifacts use group ID org.apache.flink. See the DataStream API packaging guide for a complete pom.xml example.

Flink CDC Supported Flink Versions Notes
3.6 1.20, 2.2
3.5 1.19, 1.20
3.4 1.19, 1.20
3.3 1.19, 1.20
3.2 1.17, 1.18, 1.19
3.1 1.16, 1.17, 1.18, 1.19 Only Flink CDC 3.1.1 supports Flink 1.19
3.0 1.14, 1.15, 1.16, 1.17, 1.18 Pipeline API requires Flink 1.17 and above
2.4 1.13, 1.14, 1.15, 1.16, 1.17 Flink CDC 1.x and 2.x does not support Pipeline API, same below
2.3 1.13, 1.14, 1.15, 1.16
2.2 1.13, 1.14
2.1 1.13
2.0 1.13
1.4 1.13
1.3 1.12
1.2 1.12
1.1 1.11
1.0 1.11

See the Pipeline connector overview and source connector overview for details.

Join the Community

There are many ways to participate in the Apache Flink CDC community. The mailing lists are the primary place where all Flink committers are present. For user support and questions use the user mailing list. If you've found a problem of Flink CDC, please create a Flink JIRA and tag it with the Flink CDC tag. Bugs and feature requests can either be discussed on the dev mailing list or on Jira.

Contributing

Welcome to contribute to Flink CDC, please see our Developer Guide and APIs Guide.

License

Apache 2.0 License.

Special Thanks

The Flink CDC community welcomes everyone who is willing to contribute, whether it's through submitting bug reports, enhancing the documentation, or submitting code contributions for bug fixes, test additions, or new feature development.
Thanks to all contributors for their enthusiastic contributions.

Dépôts similaires
airbytehq/airbyte

Open-source data movement for ELT pipelines and AI agents — from APIs, databases & files to warehouses, lakes, and AI applications. Both self-hosted and Cloud.

PythonPyPIOtherdatapipeline
airbyte.com
21.7k5.3k
debezium/debezium

Change data capture for a variety of databases. Please log issues at https://github.com/debezium/dbz/issues.

JavaMavenApache License 2.0change-data-capturekafka-connect
debezium.io
12.9k3k
cocoindex-io/cocoindex

Incremental engine for long horizon agents 🌟 Star if you like it!

Rustcrates.ioApache License 2.0aichange-data-capture
cocoindex.io
11k840
apache/seatunnel

SeaTunnel is a multimodal, high-performance, distributed, massive data integration tool.

JavaMavenApache License 2.0data-integrationhigh-performance
seatunnel.apache.org
9.5k2.3k
supabase/realtime

Broadcast, Presence, and Postgres Changes via WebSockets

ElixirApache License 2.0elixirpostgres
supabase.com/realtime
7.6k451
sequinstream/sequin

Postgres change data capture to streams, queues, and search indexes like Kafka, SQS, Elasticsearch, HTTP endpoints, and more

ElixirMIT Licensecdcchange-data-capture
sequinstream.com
2.2k143
debezium/debezium-examples

Examples for running Debezium (Configuration, Docker Compose files etc.). Please log issues at https://github.com/debezium/dbz/issues.

JavaScriptnpmApache License 2.0debeziumchange-data-capture
debezium.io
1.7k869
datazip-inc/olake

OLake - Fastest Databases, Kafka & S3 Replication to Apache Iceberg with Table optimization (Called OLake Fusion). ⚡ Efficient, quick and scalable data ingestion for real-time analytics. Supported sources : Postgres, MongoDB, MySQL, Oracle, MSSql, DB2, Kafka, S3.

GoGo ModulesApache License 2.0cdcchange-data-capture
olake.io
1.4k239
toluaina/pgsync

Postgres to Elasticsearch/OpenSearch sync

PythonPyPIMIT Licenseelasticsearchelasticsearch-sync
pgsync.com
1.4k211
drasi-project/drasi-platform

The Data Change Processing platform

C#Apache License 2.0cdcchange-data-capture
drasi.io
1.2k87