databendcloud / flink-connector-databend Goto Github PK
View Code? Open in Web Editor NEWFlink SQL connector for Databend.
License: Apache License 2.0
Flink SQL connector for Databend.
License: Apache License 2.0
Because MongoDB using _id
as primary key, it it String
type and will get error in databend.
Now: DELETE from target_table where _id=xxxxx
.
Expected: DELETE from target_table where id='xxxxx'
such as we have these tables that need to be synchronized.
mysql tables
a_0
a_1
b_0
b_1
c
databend tables
a
b
c
We can add two parameters to achieve this effect.
--including-tables="a_.|b_.|c"
--multi-to-one-origin="a_.|b_."
--multi-to-one-target="a|b"
Implementation principle :
1.Create only one table
2.Multiple tables to one side output stream
Test sync data from MongoDB using MongoDB flink connector and databend flink connector.
There are many users who want this function, so we need to support delete
in CDC, otherwise the connector
is not a complete CDC plan.
Flink CDC has released 3.0.0 and this version has many enhancements such as schema evolution, Flink CDC Cli, database sync etc. More details in https://mp.weixin.qq.com/s/rkjIK2UH_IeC5QIwHw_4fw.
So we plan to support flink-connector -databend to integrate with 3.0.
Support full-database synchronization.
The table-name also need to support regular expressions to monitor multiple tables that satisfy the regular expressions.
link SQL> CREATE TABLE dproducts (id INT,name String,description String, PRIMARY KEY (`id`) NOT ENFORCED)
> WITH ('connector' = 'databend',
> 'url'='databend://localhost:8000',
> 'username'='wubx',
> 'password'='wubxwubx',
> 'database-name'='default',
> 'table-name'='dproducts',
> 'sink.batch-size' = '5',
> 'sink.ignore-delete' = 'false',
> 'sink.flush-interval' = '1000',
> 'sink.max-retries' = '3');
[INFO] Execute statement succeed.
Flink SQL> select * from dproducts;
[ERROR] Could not execute SQL statement. Reason:
java.io.NotSerializableException: org.apache.flink.connector.databend.internal.converter.DatabendRowConverter
There are many tables with string primary key, now delete statement of this kind of table is not supported by flink databend sink.
After the entire database synchronization defaults to one table and one sink, and tables cannot be automatically created. So we need to add that when use single sink, the table is automatically created without restarting the flink task.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.