apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
8.02k stars 1.82k forks source link

[Bug] [ ZETA] seatunnel-web mysql同步doris报错 #7028

Closed luban-130 closed 4 months ago

luban-130 commented 4 months ago

Search before asking

What happened

当使用seatunnel-web将mysql数据同步至doris时报错

SeaTunnel Version

seatunnelv2.3.3 seatunnel-webv1.0.0

SeaTunnel Config

以下配置为前端根据参数自动生成
"env" : {
        "job.mode" : "STREAMING",
        "job.name" : "SeaTunnel_Job"
    },
    "source" : [
        {
            "inverse-sampling.rate" : 1000,
            "catalog" : {
                "factory" : "Mysql"
            },
            "parallelism" : 1,
            "table-names" : [
                "indicator.ind_atomic_definition",
                "indicator.ind_calc_group",
                "indicator.ind_calc_group_definition",
                "indicator.ind_calc_log"
            ],
            "chunk-key.even-distribution.factor.lower-bound" : 0.05,
            "database-names" : [
                "indicator"
            ],
            "password" : "zdgs_412",
            "sample-sharding.threshold" : 1000,
            "incremental.parallelism" : 1,
            "snapshot.fetch.size" : 1024,
            "connect.max-retries" : 3,
            "base-url" : "jdbc:mysql://rm-8vb4u77p36r47479q.mysql.zhangbei.rds.aliyuncs.com:3306/indicator",
            "startup.mode" : "INITIAL",
            "format" : "DEFAULT",
            "result_table_name" : "Table14008338148448",
            "server-time-zone" : "UTC",
            "plugin_name" : "MySQL-CDC",
            "exactly_once" : "false",
            "connection.pool.size" : 20,
            "snapshot.split.size" : 8096,
            "stop.mode" : "NEVER",
            "chunk-key.even-distribution.factor.upper-bound" : 100,
            "connect.timeout.ms" : 30000,
            "dag-parsing.mode" : "MULTIPLEX",
            "username" : "root"
        }
    ],
    "transform" : [],
    "sink" : [
        {
            "batch_size" : 1000,
            "max_retries" : "5",
            "catalog" : {
                "factory" : "MySQL",
                "username" : "root",
                "password" : "zdgs@2024",
                "base-url" : "jdbc:mysql://172.28.147.21:9030/indicator"
            },
            "source_table_name" : "Table14008338148448",
            "max_commit_attempts" : 3,
            "auto_commit" : "true",
            "plugin_name" : "Jdbc",
            "url" : "jdbc:mysql://172.28.147.21:9030/indicator",
            "is_exactly_once" : "false",
            "database" : "indicator",
            "password" : "zdgs@2024",
            "transaction_timeout_sec" : -1,
            "driver" : "com.mysql.cj.jdbc.Driver",
            "support_upsert_by_query_primary_key_exist" : "false",
            "connection_check_timeout_sec" : 30,
            "generate_sink_sql" : true,
            "user" : "root"
        }
    ]
}

Running Command

Error Exception

Caused by: org.apache.seatunnel.api.table.catalog.exception.CatalogException: ErrorCode:[API-03], ErrorDescription:[Catalog initialize failed] - Failed creating table indicator.ind_atomic_definition
        at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.mysql.MySqlCatalog.createTableInternal(MySqlCatalog.java:300)
        at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.createTable(AbstractJdbcCatalog.java:264)
        at org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSink.handleSaveMode(JdbcSink.java:218)
        ... 71 common frames omitted
Caused by: java.sql.SQLException: errCode = 2, detailMessage = Syntax error in line 29:
        PRIMARY KEY (`id`)
         ^
Encountered: KEY
Expected

Zeta or Flink or Spark Version

zeta

Java or Scala Version

1.8

Screenshots

No response

Are you willing to submit PR?

Code of Conduct

EricJoy2048 commented 4 months ago

Can you show more logs? I can not found the create table ddl output in the log.

luban-130 commented 4 months ago

show more logs? I can not found the create table ddl output in

2024-06-21 09:25:10.498 seatunnel rocky INFO [qtp1480569460-15] [MySqlCatalog.createTableInternal():295] - create table sql: CREATE TABLE IF NOT EXISTS ind_atomic_definition ( id bigint(20) NOT NULL COMMENT '', code varchar(20) NOT NULL COMMENT '编码', title varchar(50) NOT NULL COMMENT '标题', topic_code varchar(20) NOT NULL COMMENT '主题编码', unit varchar(10) NOT NULL COMMENT '计量单位', period varchar(10) NOT NULL COMMENT '期间类型', time_moment varchar(2) NOT NULL COMMENT '时点选择', data_source varchar(255) NOT NULL COMMENT '数据源', table_name varchar(255) NOT NULL COMMENT '表名', dimension_field varchar(255) NOT NULL COMMENT '维度字段', dimension_title varchar(255) NOT NULL COMMENT '维度名称', object_field varchar(255) NOT NULL COMMENT '对象字段', object_title varchar(255) NOT NULL COMMENT '对象名称', measure_field varchar(255) NOT NULL COMMENT '度量字段', measure_title varchar(255) NOT NULL COMMENT '度量名称', label_code varchar(255) NOT NULL COMMENT '标签编码', remark varchar(255) NOT NULL COMMENT '描述', inlay char(1) NOT NULL COMMENT '是否内置', status char(1) NOT NULL COMMENT '状态', apply char(1) NOT NULL COMMENT '是否应用', unit_id bigint(20) NOT NULL COMMENT '单位id', tally_id bigint(20) NOT NULL COMMENT '账套id', create_by varchar(64) NOT NULL COMMENT '创建者', create_time datetime NOT NULL COMMENT '创建时间', update_by varchar(64) NOT NULL COMMENT '更新者', update_time datetime NOT NULL COMMENT '更新时间', version int(11) NOT NULL COMMENT '版本号', PRIMARY KEY (id) ) COMMENT = ''; 2024-06-21 09:25:10.616 seatunnel rocky INFO [qtp1480569460-15] [AbstractJdbcCatalog.close():137] - Catalog MySQL closing 2024-06-21 09:25:10.616 seatunnel rocky ERROR [qtp1480569460-15] [GlobalExceptionHandler.logError():83] - ErrorCode:[API-09], ErrorDescription:[Handle save mode failed] org.apache.seatunnel.connectors.seatunnel.jdbc.exception.JdbcConnectorException: ErrorCode:[API-09], ErrorDescription:[Handle save mode failed] at org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSink.handleSaveMode(JdbcSink.java:221) at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.handleSaveMode(MultipleTableJobConfigParser.java:641) at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.createSinkAction(MultipleTableJobConfigParser.java:631) at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSink(MultipleTableJobConfigParser.java:576) at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:190) at org.apache.seatunnel.engine.core.job.AbstractJobEnvironment.getLogicalDag(AbstractJobEnvironment.java:109) at org.apache.seatunnel.engine.client.job.JobExecutionEnvironment.execute(JobExecutionEnvironment.java:73) at org.apache.seatunnel.app.service.impl.JobExecutorServiceImpl.executeJobBySeaTunnel(JobExecutorServiceImpl.java:107) at org.apache.seatunnel.app.service.impl.JobExecutorServiceImpl.jobExecute(JobExecutorServiceImpl.java:73) at org.apache.seatunnel.app.controller.JobExecutorController.jobExecutor(JobExecutorController.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:497) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:584) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:516) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.seatunnel.api.table.catalog.exception.CatalogException: ErrorCode:[API-03], ErrorDescription:[Catalog initialize failed] - Failed creating table indicator.ind_atomic_definition at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.mysql.MySqlCatalog.createTableInternal(MySqlCatalog.java:300) at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.createTable(AbstractJdbcCatalog.java:264) at org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSink.handleSaveMode(JdbcSink.java:218) ... 71 common frames omitted Caused by: java.sql.SQLException: errCode = 2, detailMessage = Syntax error in line 29: PRIMARY KEY (id) ^ Encountered: KEY Expected

    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
    at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:370)
    at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.mysql.MySqlCatalog.createTableInternal(MySqlCatalog.java:297)
    ... 73 common frames omitted
luban-130 commented 4 months ago

show more logs? I can not found the create table ddl output in

2024-06-21 09:25:10.498 seatunnel rocky INFO [qtp1480569460-15] [MySqlCatalog.createTableInternal():295] - create table sql: CREATE TABLE IF NOT EXISTS ind_atomic_definition ( id bigint(20) NOT NULL COMMENT '', code varchar(20) NOT NULL COMMENT '编码', title varchar(50) NOT NULL COMMENT '标题', topic_code varchar(20) NOT NULL COMMENT '主题编码', unit varchar(10) NOT NULL COMMENT '计量单位', period varchar(10) NOT NULL COMMENT '期间类型', time_moment varchar(2) NOT NULL COMMENT '时点选择', data_source varchar(255) NOT NULL COMMENT '数据源', table_name varchar(255) NOT NULL COMMENT '表名', dimension_field varchar(255) NOT NULL COMMENT '维度字段', dimension_title varchar(255) NOT NULL COMMENT '维度名称', object_field varchar(255) NOT NULL COMMENT '对象字段', object_title varchar(255) NOT NULL COMMENT '对象名称', measure_field varchar(255) NOT NULL COMMENT '度量字段', measure_title varchar(255) NOT NULL COMMENT '度量名称', label_code varchar(255) NOT NULL COMMENT '标签编码', remark varchar(255) NOT NULL COMMENT '描述', inlay char(1) NOT NULL COMMENT '是否内置', status char(1) NOT NULL COMMENT '状态', apply char(1) NOT NULL COMMENT '是否应用', unit_id bigint(20) NOT NULL COMMENT '单位id', tally_id bigint(20) NOT NULL COMMENT '账套id', create_by varchar(64) NOT NULL COMMENT '创建者', create_time datetime NOT NULL COMMENT '创建时间', update_by varchar(64) NOT NULL COMMENT '更新者', update_time datetime NOT NULL COMMENT '更新时间', version int(11) NOT NULL COMMENT '版本号', PRIMARY KEY (id) ) COMMENT = ''; 2024-06-21 09:25:10.616 seatunnel rocky INFO [qtp1480569460-15] [AbstractJdbcCatalog.close():137] - Catalog MySQL closing 2024-06-21 09:25:10.616 seatunnel rocky ERROR [qtp1480569460-15] [GlobalExceptionHandler.logError():83] - ErrorCode:[API-09], ErrorDescription:[Handle save mode failed] org.apache.seatunnel.connectors.seatunnel.jdbc.exception.JdbcConnectorException: ErrorCode:[API-09], ErrorDescription:[Handle save mode failed] at org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSink.handleSaveMode(JdbcSink.java:221) at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.handleSaveMode(MultipleTableJobConfigParser.java:641) at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.createSinkAction(MultipleTableJobConfigParser.java:631) at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSink(MultipleTableJobConfigParser.java:576) at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:190) at org.apache.seatunnel.engine.core.job.AbstractJobEnvironment.getLogicalDag(AbstractJobEnvironment.java:109) at org.apache.seatunnel.engine.client.job.JobExecutionEnvironment.execute(JobExecutionEnvironment.java:73) at org.apache.seatunnel.app.service.impl.JobExecutorServiceImpl.executeJobBySeaTunnel(JobExecutorServiceImpl.java:107) at org.apache.seatunnel.app.service.impl.JobExecutorServiceImpl.jobExecute(JobExecutorServiceImpl.java:73) at org.apache.seatunnel.app.controller.JobExecutorController.jobExecutor(JobExecutorController.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:497) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:584) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1631) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:516) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.seatunnel.api.table.catalog.exception.CatalogException: ErrorCode:[API-03], ErrorDescription:[Catalog initialize failed] - Failed creating table indicator.ind_atomic_definition at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.mysql.MySqlCatalog.createTableInternal(MySqlCatalog.java:300) at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.createTable(AbstractJdbcCatalog.java:264) at org.apache.seatunnel.connectors.seatunnel.jdbc.sink.JdbcSink.handleSaveMode(JdbcSink.java:218) ... 71 common frames omitted Caused by: java.sql.SQLException: errCode = 2, detailMessage = Syntax error in line 29: PRIMARY KEY (id) ^ Encountered: KEY Expected

    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
    at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:370)
    at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.mysql.MySqlCatalog.createTableInternal(MySqlCatalog.java:297)
    ... 73 common frames omitted