开发者社区> 问答> 正文

如何处理表名带有双引号包单引号导致任务失败的情况?

如何处理表名带有双引号包单引号导致任务失败的情况?

展开
收起
Puppet 2020-03-21 09:23:16 1054 0
1 条回答
写回答
取消 提交回答
  • 问题描述:日志中报SQL语句执行失败(表名带有双引号包单引号)。 com.alibaba.datax.common.exception.DataXException: Code:[DBUtilErrorCode-07] 错误解读:读取数据库数据失败,请检查您配置的column、table、where、querySql,或者向数据库管理员寻求帮助。 执行的SQL如下所示。 select /+read_consistency(weak) query_timeout(100000000)/ _ from** 'ql_ddddd_[0-31]’ **where 1=2 错误信息如下所示。 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘ql_live_speaks[0-31]’ where 1=2’ at line 1 - com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near **’‘ql_ddddd_[0-31]’ where 1=2’ ** 排查思路:配置表名时,需要双引号包单引号。例如“table”:[“‘qlddddd[0-31]’”],直接删除其中的单引号。

    2020-03-21 09:24:11
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载