mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-03 06:09:04 +08:00
handle null data
This commit is contained in:
parent
beaf7aa620
commit
2de4e55137
@ -307,6 +307,8 @@ public class DefaultDataHandler implements DataHandler {
|
|||||||
if (colMeta.type.equals("TIMESTAMP"))
|
if (colMeta.type.equals("TIMESTAMP"))
|
||||||
return "\"" + column.asString() + "\"";
|
return "\"" + column.asString() + "\"";
|
||||||
String value = column.asString();
|
String value = column.asString();
|
||||||
|
if (value == null)
|
||||||
|
return "NULL";
|
||||||
return "\'" + Utils.escapeSingleQuota(value) + "\'";
|
return "\'" + Utils.escapeSingleQuota(value) + "\'";
|
||||||
case NULL:
|
case NULL:
|
||||||
case BAD:
|
case BAD:
|
||||||
|
Loading…
Reference in New Issue
Block a user