Camel CSVRecord Camel Bindy

随声附和 提交于 2019-12-04 16:42:07

No this is currently not supported in bindy. Is the footer in your case a single line only? Or does it have any special leading marker to indicate its a footer?

We could maybe improve bindy to support skipping footer. So maybe a footer by default is just the last line. But just wonder if people may have multiple lines as footer?

You would need to manually remove that last line yourself before parsing it with bindy. If the file is not big, and you can have it in memory you can use a Camel processor / bean and remove the last line from the message body.

You can consider an alternate solution:

  • Take the csv from customer
  • preprocess csv through a cleanup step: parse header/fooder and get it out of the way. But collect the common parameters so you can enrich other objects.
  • Parse the rest of the "clean csv" through bindy, and then enrich with header/footer common
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!