liuyongfei1 opened a new issue, #2742:
URL: https://github.com/apache/incubator-seatunnel/issues/2742

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   使用spark引擎执行jdbc 到 jdbc 的数据同步,在数据同步成功完成后,会在目的端创建一个与目的表表结构完全一致的空表。
   
   ### SeaTunnel Version
   
   最新的 dev分支。2.2.3也存在这个问题。
   
   ### SeaTunnel Config
   
   ```conf
   env {
     spark.app.name = "lyf_test_spark_0909"
     spark.executor.instances = 2
     spark.executor.cores = 1
     spark.executor.memory = "1g"
   }
   source {
     jdbc {
       driver = "com.mysql.cj.jdbc.Driver"
       url = 
"jdbc:mysql://10.*.*.*:3306/davinci?useUnicode=true&characterEncoding=utf8&useSSL=false"
       table = "sea1"
       result_table_name = "sea1_data"
       user = "*****"
       password = "**********"
    }
   }
   transform {
     sql {
       sql = "select id,name from sea1_data"
     }
   }
   sink {
     jdbc {
       saveMode = "update"
       driver = "com.mysql.cj.jdbc.Driver"
       url = 
"jdbc:mysql://10.*.*.*:3306/davinci?useUnicode=true&characterEncoding=utf8&useSSL=false"
       user = "*"
       password = "*"
       dbTable = "sea1_data"
       customUpdateStmt = "insert into sea3(id,name) values(?,?)"
    }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   /apache-seatunnel-incubating-2.1.3-SNAPSHOT/bin/start-seatunnel-spark.sh 
--master yarn --deploy-mode cluster --config 
/apache-seatunnel-incubating-2.1.3-SNAPSHOT/config/test.spark.jdbc.jdbc.conf
   ```
   
   
   ### Error Exception
   
   ```log
   没有报错,任务成功执行。
   ```
   
   
   ### Flink or Spark Version
   
   spark version:  2.3.2.3.1.5.0-152
   
   ### Java or Scala Version
   
   java:1.8
   scala:2.11
   
   ### Screenshots
   
   1、任务成功执行,目的表已经写入数据:
   
   <img width="244" alt="table-4" 
src="https://user-images.githubusercontent.com/4757906/190391261-8bfb1b94-335d-43a8-9e30-80964d2bbd22.png";>
   
   2、在目的端会生成一个与目的表结构一模一样的空表:
   <img width="281" alt="table-5" 
src="https://user-images.githubusercontent.com/4757906/190391362-001064e5-64c6-44b5-94f0-21b461323ac8.png";>
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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