GithubHelp home page GithubHelp logo

mongdbreader 中某些字段可能 不存在的情况时,读数据时,会提示源字段与目标字段个数不一致的问题 about addax HOT 2 CLOSED

wgzhao avatar wgzhao commented on August 19, 2024
mongdbreader 中某些字段可能 不存在的情况时,读数据时,会提示源字段与目标字段个数不一致的问题

from addax.

Comments (2)

wgzhao avatar wgzhao commented on August 19, 2024

感谢反馈,可以考虑,针对没有字段的行,设置该字段的默认值为null

from addax.

wgzhao avatar wgzhao commented on August 19, 2024

刚进过测试,当前master分支上的mongodbreader是指支持缺失字段读取为null的功能的。
以下我是的测试结果

2020-09-17 20:27:47.171 [0-0-0-reader] INFO  connection - Opened connection [connectionId{localValue:5, serverValue:30}] to 127.0.0.1:32768
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
add_id	auction_id	new column	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type
unique_id	auction_id	null	content_type

注意到值为new column的这列,实际上我是分两次写入到 mongodb,第一次是有这个字段,值为new column,第二次写入则没有这个值。
我们可以看到最后十条该字段的输出为 null

如果你当前的版本不支持,可以从这里下载我最新版本(提取码 jxxa),替换你当前jar包,然后测试再看看。
如果还有问题,可以贴出你的整个测试过程

from addax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.