{
"job":{
"setting":{
"speed":{
"channel":2,
"byte":1048576
},
"errorLimit":{
"record":0,
"percentage":0.02
}
},
"content":[
{
"reader":{
"name":"rdbmsreader",
"parameter":{
"username":"lightcode",
"password":"simayi@123",
"splitPk":"",
"connection":[
{
"querySql":[
"select name,archives_no from archives_basics"
],
"jdbcUrl":[
"jdbc:kingbase8://10.10.10.191:54321/lightcode"
]
}
]
}
},
"writer":{
"name":"rdbmswriter",
"parameter":{
"username":"lightcode",
"password":"simayi@123",
"column":[
" name
",
" pwd
"
],
"connection":[
{
"table":[
"test"
],
"jdbcUrl":"jdbc:kingbase8://10.10.10.191:54321/lightcode"
}
]
}
}
}
]
},
"core":{
"transport":{
"channel":{
"speed":{
"byte":524288
}
}
}
}
}
转换时提示
2022-07-23 14:26:35.300 [main] WARN Engine - prioriy set to 0, because NumberFormatException, the value is: null
2022-07-23 14:26:35.301 [main] INFO PerfTrace - PerfTrace traceId=job_-1, isEnable=false, priority=0
2022-07-23 14:26:35.301 [main] INFO JobContainer - DataX jobContainer starts job.
2022-07-23 14:26:35.304 [main] INFO JobContainer - Set jobId = 0
2022-07-23 14:26:40.799 [job-0] INFO OriginalConfPretreatmentUtil - Available jdbcUrl:jdbc:kingbase8://10.10.10.191:54321/lightcode.
2022-07-23 14:26:40.845 [job-0] INFO OriginalConfPretreatmentUtil - table:[test] all columns:[
name,pwd
].
2022-07-23 14:26:40.878 [job-0] ERROR JobContainer - Exception when job run
com.alibaba.datax.common.exception.DataXException: Code:[DBUtilErrorCode-01], Description:[获取表字段相关信息失败.]. - 获取表:test 的字段的元信息时失败. 请联系 DBA 核查该库、表信息. - com.kingbase8.util.KSQLException: 错误: 操作符不存在: ` varchar
Hint: 没有匹配指定名称和参数类型的操作符. 您也许需要增加明确的类型转换.
Position: 8 At Line: 1, Line Position: 8
at com.kingbase8.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2679)
at com.kingbase8.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2367)
at com.kingbase8.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:318)
at com.kingbase8.jdbc.KbStatement.executeInternal(KbStatement.java:472)
at com.kingbase8.jdbc.KbStatement.execute(KbStatement.java:392)
at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:333)
at com.kingbase8.jdbc.KbStatement.executeCachedSql(KbStatement.java:319)
at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:296)
at com.kingbase8.jdbc.KbStatement.executeQuery(KbStatement.java:246)
at com.alibaba.datax.plugin.rdbms.util.DBUtil.getColumnMetaData(DBUtil.java:563)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.dealColumnConf(OriginalConfPretreatmentUtil.java:125)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.dealColumnConf(OriginalConfPretreatmentUtil.java:140)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.doPretreatment(OriginalConfPretreatmentUtil.java:35)
at com.alibaba.datax.plugin.rdbms.writer.CommonRdbmsWriter$Job.init(CommonRdbmsWriter.java:41)
at com.alibaba.datax.plugin.reader.rdbmswriter.RdbmsWriter$Job.init(RdbmsWriter.java:38)
at com.alibaba.datax.core.job.JobContainer.initJobWriter(JobContainer.java:704)
at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:304)
at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113)
at com.alibaba.datax.core.Engine.start(Engine.java:92)
at com.alibaba.datax.core.Engine.entry(Engine.java:171)
at com.alibaba.datax.core.Engine.main(Engine.java:204)
at com.alibaba.datax.common.exception.DataXException.asDataXException(DataXException.java:33) ~[datax-common-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.util.DBUtil.getColumnMetaData(DBUtil.java:575) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.dealColumnConf(OriginalConfPretreatmentUtil.java:125) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.dealColumnConf(OriginalConfPretreatmentUtil.java:140) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.doPretreatment(OriginalConfPretreatmentUtil.java:35) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.rdbms.writer.CommonRdbmsWriter$Job.init(CommonRdbmsWriter.java:41) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.plugin.reader.rdbmswriter.RdbmsWriter$Job.init(RdbmsWriter.java:38) ~[rdbmswriter-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.core.job.JobContainer.initJobWriter(JobContainer.java:704) ~[datax-core-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:304) ~[datax-core-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113) ~[datax-core-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.core.Engine.start(Engine.java:92) [datax-core-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.core.Engine.entry(Engine.java:171) [datax-core-0.0.1-SNAPSHOT.jar:na]
at com.alibaba.datax.core.Engine.main(Engine.java:204) [datax-core-0.0.1-SNAPSHOT.jar:na]
Caused by: com.kingbase8.util.KSQLException: 错误: 操作符不存在: ` varchar
Hint: 没有匹配指定名称和参数类型的操作符. 您也许需要增加明确的类型转换.
Position: 8 At Line: 1, Line Position: 8
at com.kingbase8.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2679) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.kingbase8.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2367) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.kingbase8.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:318) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.kingbase8.jdbc.KbStatement.executeInternal(KbStatement.java:472) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.kingbase8.jdbc.KbStatement.execute(KbStatement.java:392) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:333) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.kingbase8.jdbc.KbStatement.executeCachedSql(KbStatement.java:319) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:296) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.kingbase8.jdbc.KbStatement.executeQuery(KbStatement.java:246) ~[kingbase8-8.6.0.jar:V008R006B0301]
at com.alibaba.datax.plugin.rdbms.util.DBUtil.getColumnMetaData(DBUtil.java:563) ~[plugin-rdbms-util-0.0.1-SNAPSHOT.jar:na]
... 11 common frames omitted
2022-07-23 14:26:40.884 [job-0] INFO StandAloneJobContainerCommunicator - Total 0 records, 0 bytes | Speed 0B/s, 0 records/s | Error 0 records, 0 bytes | All Task WaitWriterTime 0.000s | All Task WaitReaderTime 0.000s | Percentage 0.00%
2022-07-23 14:26:40.885 [job-0] ERROR Engine -
经DataX智能分析,该任务最可能的错误原因是:
com.alibaba.datax.common.exception.DataXException: Code:[DBUtilErrorCode-01], Description:[获取表字段相关信息失败.]. - 获取表:test 的字段的元信息时失败. 请联系 DBA 核查该库、表信息. - com.kingbase8.util.KSQLException: 错误: 操作符不存在: ` varchar
Hint: 没有匹配指定名称和参数类型的操作符. 您也许需要增加明确的类型转换.
Position: 8 At Line: 1, Line Position: 8
at com.kingbase8.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2679)
at com.kingbase8.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2367)
at com.kingbase8.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:318)
at com.kingbase8.jdbc.KbStatement.executeInternal(KbStatement.java:472)
at com.kingbase8.jdbc.KbStatement.execute(KbStatement.java:392)
at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:333)
at com.kingbase8.jdbc.KbStatement.executeCachedSql(KbStatement.java:319)
at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:296)
at com.kingbase8.jdbc.KbStatement.executeQuery(KbStatement.java:246)
at com.alibaba.datax.plugin.rdbms.util.DBUtil.getColumnMetaData(DBUtil.java:563)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.dealColumnConf(OriginalConfPretreatmentUtil.java:125)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.dealColumnConf(OriginalConfPretreatmentUtil.java:140)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.doPretreatment(OriginalConfPretreatmentUtil.java:35)
at com.alibaba.datax.plugin.rdbms.writer.CommonRdbmsWriter$Job.init(CommonRdbmsWriter.java:41)
at com.alibaba.datax.plugin.reader.rdbmswriter.RdbmsWriter$Job.init(RdbmsWriter.java:38)
at com.alibaba.datax.core.job.JobContainer.initJobWriter(JobContainer.java:704)
at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:304)
at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113)
at com.alibaba.datax.core.Engine.start(Engine.java:92)
at com.alibaba.datax.core.Engine.entry(Engine.java:171)
at com.alibaba.datax.core.Engine.main(Engine.java:204)
at com.alibaba.datax.common.exception.DataXException.asDataXException(DataXException.java:33)
at com.alibaba.datax.plugin.rdbms.util.DBUtil.getColumnMetaData(DBUtil.java:575)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.dealColumnConf(OriginalConfPretreatmentUtil.java:125)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.dealColumnConf(OriginalConfPretreatmentUtil.java:140)
at com.alibaba.datax.plugin.rdbms.writer.util.OriginalConfPretreatmentUtil.doPretreatment(OriginalConfPretreatmentUtil.java:35)
at com.alibaba.datax.plugin.rdbms.writer.CommonRdbmsWriter$Job.init(CommonRdbmsWriter.java:41)
at com.alibaba.datax.plugin.reader.rdbmswriter.RdbmsWriter$Job.init(RdbmsWriter.java:38)
at com.alibaba.datax.core.job.JobContainer.initJobWriter(JobContainer.java:704)
at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:304)
at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113)
at com.alibaba.datax.core.Engine.start(Engine.java:92)
at com.alibaba.datax.core.Engine.entry(Engine.java:171)
at com.alibaba.datax.core.Engine.main(Engine.java:204)
Caused by: com.kingbase8.util.KSQLException: 错误: 操作符不存在: ` varchar
Hint: 没有匹配指定名称和参数类型的操作符. 您也许需要增加明确的类型转换.
Position: 8 At Line: 1, Line Position: 8
at com.kingbase8.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2679)
at com.kingbase8.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2367)
at com.kingbase8.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:318)
at com.kingbase8.jdbc.KbStatement.executeInternal(KbStatement.java:472)
at com.kingbase8.jdbc.KbStatement.execute(KbStatement.java:392)
at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:333)
at com.kingbase8.jdbc.KbStatement.executeCachedSql(KbStatement.java:319)
at com.kingbase8.jdbc.KbStatement.executeWithFlags(KbStatement.java:296)
at com.kingbase8.jdbc.KbStatement.executeQuery(KbStatement.java:246)
at com.alibaba.datax.plugin.rdbms.util.DBUtil.getColumnMetaData(DBUtil.java:563)
... 11 more
1条答案
按热度按时间wn9m85ua1#
两个字段都是 varchar 写入的字段也是一样的