hailin0 commented on code in PR #5663:
URL: https://github.com/apache/seatunnel/pull/5663#discussion_r1373125601


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkFactory.java:
##########
@@ -164,19 +221,23 @@ public TableSink createSink(TableSinkFactoryContext 
context) {
                 sinkConfig.getJdbcConnectionConfig().getProperties(),
                 dialect.defaultParameter());
         CatalogTable finalCatalogTable = catalogTable;
+        // get saveMode
+        DataSaveMode dataSaveMode = config.get(DATA_SAVE_MODE);
+        SchemaSaveMode schemaSaveMode = config.get(SCHEMA_SAVE_MODE);
         return () ->
                 new JdbcSink(
                         options,
                         sinkConfig,
                         dialect,
-                        DataSaveMode.KEEP_SCHEMA_AND_DATA,
+                        schemaSaveMode,
+                        dataSaveMode,
                         finalCatalogTable);
     }
 
     @Override
     public OptionRule optionRule() {
         return OptionRule.builder()
-                .required(URL, DRIVER)
+                .required(URL, DRIVER, SCHEMA_SAVE_MODE, DATA_SAVE_MODE)

Review Comment:
   Add testcase into this config
   
   
https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-1/src/test/resources/jdbc_mysql_source_and_sink_with_multiple_tables.conf
   
   
https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-mysql-e2e/src/test/resources/mysqlcdc_to_mysql_with_multi_table.conf



-- 
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