flink-cdc icon indicating copy to clipboard operation
flink-cdc copied to clipboard

DataStream api need support close incremental snapshot

Open Kyofin opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. When i use Datastream Api to Collect Mysql Binlog to Kafka , I find it will error when some table don't have primary key. Error message is below:

Incremental snapshot for tables requires primary key, but table ssb.customer doesn't have primary key

Describe the solution you'd like flink 1.13.6 , flinkcdc 2.2.1 my code :

  MySqlSource<String> mySqlSource = MySqlSource.<String>builder()
                .hostname("xxx")
                .port(3306)
                .databaseList("ssb") // set captured database
                .tableList("ssb.*") // set captured table
                .username("xxx")
                .password("xxx")
                .startupOptions(StartupOptions.initial())
                .deserializer(new JsonDebeziumDeserializationSchema()) 
                .build();

How can i close Incremental snapshot when i use datastream api?

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Kyofin avatar Jul 01 '22 10:07 Kyofin

How did you solve the problem

JavaKingCr avatar Aug 23 '22 08:08 JavaKingCr

hellp

JavaKingCr avatar Aug 23 '22 08:08 JavaKingCr

Closing this issue because it was created before version 2.3.0 (2022-11-10). Please try the latest version of Flink CDC to see if the issue has been resolved. If the issue is still valid, kindly report it on Apache Jira under project Flink with component tag Flink CDC. Thank you!

PatrickRen avatar Feb 28 '24 15:02 PatrickRen