mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-03 18:49:44 +08:00
支持json类型同步
This commit is contained in:
parent
f6d21f112d
commit
285a46cd65
@ -173,6 +173,8 @@ public class MongoDBReader extends Reader {
|
|||||||
String tempArrayStr = Joiner.on(splitter).join(array);
|
String tempArrayStr = Joiner.on(splitter).join(array);
|
||||||
record.addColumn(new StringColumn(tempArrayStr));
|
record.addColumn(new StringColumn(tempArrayStr));
|
||||||
}
|
}
|
||||||
|
}else if ("json".equalsIgnoreCase(column.getString("type"))) {
|
||||||
|
record.addColumn(new StringColumn(JSON.toJSONString(tempCol)));
|
||||||
} else {
|
} else {
|
||||||
record.addColumn(new StringColumn(tempCol.toString()));
|
record.addColumn(new StringColumn(tempCol.toString()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user