JamesBaiyong opened a new issue, #4960:
URL: https://github.com/apache/seatunnel/issues/4960

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   zh: 在sink到mysql的时候,发现jdbc连接器,批量写入batch_size参数没有生效,数据库端,仍是单条写入,效率比较低
   en:  When sinking to MySQL, I found that the JDBC connector's batch_size 
parameter for batch writing did not take effect. The database end still wrote 
one by one, and the efficiency was relatively low. 
   
   ### SeaTunnel Version
   
   2.3.1
   
   ### SeaTunnel Config
   
   ```conf
   env {
       execution.parallelism=2
       job.mode="BATCH"
   }
   
   source {
     Jdbc {
       url = "jdbc:mysql://host:port/db"
       driver = "com.mysql.cj.jdbc.Driver"
       connection_check_timeout_sec = 100
       user = "user"
       password = "password"
       parallelism=5
       query = "select * from db.table where create_time>='2023-06-01'"
   }
   }
   
   sink {
       jdbc {
           url="jdbc:mysql://localhost:3306/db_name"
           driver="com.mysql.cj.jdbc.Driver"
           user="root"
           password="mysql123"
           database=db_name
   
           batch_size=10000
           batch_interval_ms=20000
           table="table_name"
           parallelism=10
           primary_keys=["id"]
       }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   sh 
/opt/apache-seatunnel-incubating-2.3.1/bin/start-seatunnel-spark-2-connector-v2.sh
 --master yarn --config test.conf
   ```
   
   
   ### Error Exception
   
   ```log
   zh: 没有报错信息,只是发现batch size参数没有生效,数据仍然以单条的形式写入数据库。
   en: There is no error message, but I found that the batch size parameter did 
not take effect, and the data was still written to the database one by one.
   ```
   
   
   ### Flink or Spark Version
   
   spark version: 2.4.0
   
   
   ### Java or Scala Version
   
   scala version: 2.11.12
   
   ### Screenshots
   
   <img width="458" alt="image" 
src="https://github.com/apache/seatunnel/assets/23315594/189e56b2-dd28-4610-850e-97ca4996642d";>
   
   
   ### 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