camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: JPA enpoint to CSV enpoint working but only 1 row
Date Tue, 19 Nov 2013 08:08:31 GMT
Hi

See the fileExist option on this page: http://camel.apache.org/file2


On Tue, Nov 19, 2013 at 4:38 AM, richie.riviere@gmail.com
<richie.riviere@gmail.com> wrote:
> Hi all,
>
> I have written a route that executes a JPA named query and then marshall's
> the object into csv...
>
>     private void configureCsvExportRoute () throws Exception {
>         from(END_POINT_JPA_ITEM_EXPORT)
>         .marshal()
>         .csv()
>         .to(END_POINT_FILE_ITEM_EXPORT);
>     }
>
> It works fine however the query picks up about 100 rows but I'm only left
> with 1 row in the csv. When having a look at the output in the console I can
> see that the csv is being overwritten for each row.
>
> How can I achieve all the rows being created in the csv? Do I have to use an
> aggregator? If so what would it look like.
>
> thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JPA-enpoint-to-CSV-enpoint-working-but-only-1-row-tp5743483.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message