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

   ### 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
   
   my sink database is dameng, when source table is with comment, then task 
will be failed, I checked the logs, I found the create table sql executed 
failed, and I found dameng jdbc don't support multi sql statement with 
semicolon with one commit
   
   ### SeaTunnel Version
   
   2.3.12
   
   ### SeaTunnel Config
   
   ```conf
   {
     "env": {
       "job.mode": "BATCH",
       "job.name": "达梦数据同步",
       "parallelism": 2
     },
     "sink": [
       {
         "url": 
"jdbc:dm://xxx.xxx.x.xxx:5237/TBQZK?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&schema=TBQZK",
         "table": "TBQZK.SETTING_NODE_STATUS",
         "driver": "dm.jdbc.driver.DmDriver",
         "database": "SW_ZZJD",
         "password": "******",
         "username": "SYSDBA",
         "max_retries": 0,
         "plugin_name": "Jdbc",
         "plugin_input": [
           "table1_step2"
         ],
         "generate_sink_sql": true
       }
     ],
     "params": {
       "jobName": "达梦数据同步"
     },
     "source": [
       {
         "url": 
"jdbc:mysql://xxx.xxx.x.xxx:3306/sw-zzjd?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true&useSSL=false",
         "driver": "com.mysql.cj.jdbc.Driver",
         "password": "******",
         "username": "root",
         "split.size": 100,
         "table_path": "sw-zgjd.setting_node_status",
         "plugin_name": "Jdbc",
         "plugin_output": "table1_step1",
         "connection_check_timeout_sec": 100
       }
     ],
     "transform": [
       {
         "plugin_name": "FilterRowKind",
         "plugin_input": "table1_step1",
         "include_kinds": [
           "INSERT",
           "UPDATE_AFTER"
         ],
         "plugin_output": "table1_step2"
       }
     ]
   }
   ```
   
   ### Running Command
   
   ```shell
   I run this task by api mode
   ```
   
   ### Error Exception
   
   ```log
   Caused by: 
org.apache.seatunnel.api.table.catalog.exception.CatalogException: 
ErrorCode:[API-03], ErrorDescription:[Catalog initialize failed] - Failed 
creating table SW_ZZJD.TBQZK.SETTING_NODE_STATUS
   at 
org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.createTableInternal(AbstractJdbcCatalog.java:496)
   at 
org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.createTable(AbstractJdbcCatalog.java:472)
   at 
org.apache.seatunnel.connectors.seatunnel.jdbc.sink.savemode.JdbcSaveModeHandler.createTable(JdbcSaveModeHandler.java:48)
   at 
org.apache.seatunnel.api.sink.DefaultSaveModeHandler.createSchemaWhenNotExist(DefaultSaveModeHandler.java:139)
   at 
org.apache.seatunnel.api.sink.DefaultSaveModeHandler.handleSchemaSaveMode(DefaultSaveModeHandler.java:88)
   at 
org.apache.seatunnel.api.sink.SaveModeHandler.handleSaveMode(SaveModeHandler.java:42)
   at 
org.apache.seatunnel.api.sink.SaveModeExecuteWrapper.execute(SaveModeExecuteWrapper.java:36)
   at 
org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:564)
   ... 21 more
   Caused by: dm.jdbc.driver.DMException: line 14, column 1, nearby [COMMENT] 
has error:
   Syntax error
   at dm.jdbc.driver.DBError.throwException(SourceFile:738)
   at dm.jdbc.a.a.y.r(SourceFile:623)
   at dm.jdbc.a.a.f.r(SourceFile:138)
   at dm.jdbc.a.a.y.z(SourceFile:555)
   at dm.jdbc.a.a.y.L(SourceFile:536)
   at dm.jdbc.a.a.a(SourceFile:269)
   at dm.jdbc.a.a.a(SourceFile:792)
   at dm.jdbc.driver.DmdbPreparedStatement.prepareSql(SourceFile:321)
   at dm.jdbc.driver.DmdbPreparedStatement.allocateHandle(SourceFile:246)
   at dm.jdbc.driver.DmdbPreparedStatement.(SourceFile:148)
   at dm.jdbc.driver.DmdbPreparedStatement.(SourceFile:198)
   at dm.jdbc.driver.DmdbConnection.do_prepareStatement(SourceFile:793)
   at dm.jdbc.driver.DmdbConnection.do_prepareStatement(SourceFile:779)
   at dm.jdbc.driver.DmdbConnection.prepareStatement(SourceFile:1413)
   at 
org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.executeInternal(AbstractJdbcCatalog.java:666)
   at 
org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.createTableInternal(AbstractJdbcCatalog.java:492)
   ... 28 more
   ```
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] 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