1362227089 commented on issue #12267:
URL: https://github.com/apache/seatunnel/issues/12267#issuecomment-5723786747

   Thanks for your guidance.
   
   Below is my minimal sanitized job configuration that reproduces the 
`Duplicate key` error.
   No extra custom debezium properties are added, all debezium settings use 
default values.
   
   ```
   env {
     parallelism = 1
     job.mode = "STREAMING"
     checkpoint.interval = 10000
   }
   source {
     Postgres-CDC {
       plugin_output = "highgo_cdc"
       username = "st_user_source"
       password = "highgosqlpw"
       database-names = ["highgo"]
       schema-names = ["testdb"]
       table-names = ["highgo.testdb.test_a"]
       snapshot {
         enabled = true
       }
       url = "jdbc:postgresql://highgo_cdc_e2e:5866/highgo?loggerLevel=OFF"
       schema‑changes.enabled = false
     }
   }
   sink {
     Jdbc {
       plugin_input = "highgo_cdc"
       url = 
"jdbc:mysql://mysql_cdc_e2e:13307/testdb?useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true"
       driver = "com.mysql.cj.jdbc.Driver"
       username = "st_user_sink"
       password = "mysqlpw"
       generate_sink_sql = true
       database = "sdr_platform"
       table = "${table_name}"
       primary_keys = ["id"]
     }
   }
   ```
   
   Below is the DDL of the test table, along with metadata query statements.
   
   ```
   CREATE TABLE "testdb"."test_a" (
     "id" character varying(32) NOT NULL,
     "name" character varying(255),
     "age" integer,
     "description" character varying(255),
     "create_time" timestamp without time zone,
     PRIMARY KEY ("id")
   );
   COMMENT ON TABLE "testdb"."test_a" IS '测试表A';
   COMMENT ON COLUMN "testdb"."test_a"."id" IS '主键ID';
   COMMENT ON COLUMN "testdb"."test_a"."name" IS '姓名';
   COMMENT ON COLUMN "testdb"."test_a"."age" IS '年龄';
   COMMENT ON COLUMN "testdb"."test_a"."description" IS '个人简介';
   COMMENT ON COLUMN "testdb"."test_a"."create_time" IS '创建时间';
   ```
   
   I executed the following SQL to obtain replica‑identity metadata:
   ```
   SELECT relname,relreplident,relnamespace FROM pg_class WHERE 
relname='test_a';
   ```
   
   <img width="438" height="69" alt="Image" 
src="https://github.com/user-attachments/assets/fe23bd8b-fed7-4db9-84c1-7596443eee42";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to