Gep
Gep

Reputation: 926

Camel Bindy: how to ignore last columns

I have a CSV file, which I'm parsing using Bindy. I have created a CsvRecord class with all the DataField. Now, they have added new columns to the CSV file and I want Bindy to just ignore them. How do I do that? I know I could change the code adding the extra fields and just ignore them, but I don't want to have to release a new version of my software every time somebody decides to add extra columns to the input file. Thank you!

Upvotes: 1

Views: 876

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55750

You may need to add one extra field, and then configure bindy to use autospanLine = true to allow that one extra field be like a garbage field for any additional columns there may come now or in the future.

Upvotes: 2

Related Questions