datax导入数据到mysql,mysql建表字段有保留字段时报错
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 5.7k
- PR merge metrics
- No merged PRs in 30d
Description
本人想实现的功能是两台mysql之间实现用datax导表, 通过sh脚本调度的方式实现自动获取建表语句,自动建表,自动生成json并调度datax导表。
在导入数据的时候出现这个问题 报错信息为com.alibaba.datax.common.exception.DataXException: Code:[DBUtilErrorCode-01], Description:[获取表字段相关信息失败.].
经查明原因是建表字段有order和describe,导数datax写入mysql时报错, 目前是通过手工更改字段名的方式暂时维持,想请教是否有办法忽略掉mysql保留字段或者实现插入数据时自动加上转义符等操作。。就不需要额外的手工维护
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the DataX import with MySQL columns named order and describe, and trace the failure reported as DBUtilErrorCode-01. Determine where the generated table metadata or insert statement rejects these reserved names. Done means importing such tables succeeds without manually renaming columns or maintaining escape changes outside DataX.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100