alibaba / alibaba/DataX

mysql非空字段有''空字符串,insert失败

Open
#134 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
17.4k
Forks
5.7k
PR merge metrics
No merged PRs in 30d

Description

SQLServer-->mysql
表里面有非空字段,存的是空字符或者多个空格
写到mysql,报不能为空异常
![20180711172250](https://user-images.githubusercontent.com/22759649/42562732-1a086ed0-852f-11e8-8299-4156402bd3b2.png)

错误信息:2018-07-11 04:48:58.156 [0-0-0-writer] WARN CommonRdbmsWriter$Task - 回滚此次写入, 采用每次写入一行方式提交. 因为:Column 'MSP' cannot be null
2018-07-11 04:48:58.186 [0-0-0-writer] ERROR StdoutPluginCollector -
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'MSP' cannot be null

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the SQLServer-to-MySQL write described in the issue; no file, test, or entry point is named. Done means the source empty string or whitespace value no longer becomes a null value that causes the MySQL non-null constraint failure.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.