camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wolf <cwolf.a...@gmail.com>
Subject Re: unmarshall csv problem with bindy
Date Tue, 15 Jan 2013 20:33:13 GMT
I tried doing some CSV parsing with bindy and had some issues due to
variable length records in the same file and other format weirdness.
I ended up using camel-beanio.  It's very flexible/configurable and
works well.

    -Chris


http://camel.apache.org/beanio.html
http://beanio.org

On Wed, Jan 2, 2013 at 10:14 PM, Ramiro <ramirobot@gmail.com> wrote:
> Im working with Karaf 2.2.10 and Camel 2.10.1. I receive a file, parse the
> csv to a pojo, and do some other suff. My problem is that if a field in a
> record on the csv ends with a coma like the third field here:
>
> someFieldValue,someOtherFieldValue,"aaaa ,",moreStuff
>
> It puts together aaaa , with moreStuff in a single field(ignoring the
> second quote). But if i add something like:
>
> someFieldValue,someOtherFieldValue,"aaaa , bbb",moreStuff
>
> It gets processed without a problem(aaaa , bbb in a field, moreStuff in
> another). Seems like Camel is interpreting the ," pair like something to
> escape.
>
> Im using comma as the separator, and i've tried with other separators and
> setting the quote attribute of the @CsvRecord to single and double quotes.
>
>
> Is this expected behaviour, or some known bug? Any workarounds?

Mime
View raw message