diff --git a/docs/content/about.md b/docs/content/about.md index ffacdb42c..3369cd90f 100644 --- a/docs/content/about.md +++ b/docs/content/about.md @@ -51,7 +51,8 @@ CREATE TABLE mysql_binlog ( id INT NOT NULL, name STRING, description STRING, - weight DECIMAL(10,3) + weight DECIMAL(10,3), + PRIMARY KEY(id) NOT ENFORCED ) WITH ( 'connector' = 'mysql-cdc', 'hostname' = 'localhost', @@ -87,7 +88,7 @@ import com.ververica.cdc.connectors.mysql.MySqlSource; public class MySqlBinlogSourceExample { public static void main(String[] args) throws Exception { - SourceFunction sourceFunction = MySQLSource.builder() + SourceFunction sourceFunction = MySqlSource.builder() .hostname("localhost") .port(3306) .databaseList("inventory") // monitor all tables under inventory database diff --git a/docs/content/connectors/mysql-cdc.md b/docs/content/connectors/mysql-cdc.md index 6504f1273..31379f0c0 100644 --- a/docs/content/connectors/mysql-cdc.md +++ b/docs/content/connectors/mysql-cdc.md @@ -81,8 +81,9 @@ Flink SQL> CREATE TABLE orders ( customer_name STRING, price DECIMAL(10, 5), product_id INT, - order_status BOOLEAN - WITH ( + order_status BOOLEAN, + PRIMARY KEY(order_id) NOT ENFORCED + ) WITH ( 'connector' = 'mysql-cdc', 'hostname' = 'localhost', 'port' = '3306', @@ -365,11 +366,11 @@ The Incremental Snapshot Reading feature of MySQL CDC Source only exposes in SQL import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.functions.source.SourceFunction; import com.ververica.cdc.debezium.StringDebeziumDeserializationSchema; -import com.ververica.cdc.connectors.mysql.MySQLSource; +import com.ververica.cdc.connectors.mysql.MySqlSource; public class MySqlBinlogSourceExample { public static void main(String[] args) throws Exception { - SourceFunction sourceFunction = MySQLSource.builder() + SourceFunction sourceFunction = MySqlSource.builder() .hostname("localhost") .port(3306) .databaseList("inventory") // monitor all tables under inventory database