当前位置:   article > 正文

【Flink】The primary key is necessary when enable ‘Key: ‘scan.incremental.snapshot.enabled‘ , default:_the primary key is necessary when enable 'key: 'sc

the primary key is necessary when enable 'key: 'scan.incremental.snapshot.en

问题出现:在执行FlinkSQL-CDC连接mysql的时候,使用FlinkSQL客户端出现如下问题:

Flink SQL> CREATE TABLE demo (
>      id int,
>      name STRING
>      ) WITH (
>      'connector' = 'mysql-cdc',
>      'hostname' = 'localhost',
>      'port' = '3306',
>      'username' = 'root',
>      'password' = 'root',
>      'database-name' = 'cdc',
>      'table-name' = 'cdc_test');
>
[INFO] Execute statement succeed.

Flink SQL> select * from demo;
[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.table.api.ValidationException: The primary key is necessary when enable 'Key: 'scan.incremental.snapshot.enabled' , default: true (fallback keys

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/598277
推荐阅读
相关标签
  

闽ICP备14008679号