camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe San <codeintheo...@gmail.com>
Subject Re: CSV files processing
Date Thu, 11 Jul 2013 09:34:27 GMT
The problem is that I cannot rely on that file name. I have to rely on the
content. The first line in the CSV file will always contain what is being
exported with the field names. This set of field names are finite. I can of
course hard code that comma seperated field names in a string and compare
them. But is there a better approach like we do for an xml using xpath?

Regards,
Joe


On Thu, Jul 11, 2013 at 8:22 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> If you pickup files using the file component, then the message headers
> contains file name information.
> http://camel.apache.org/file2
>
>
>
> On Wed, Jul 10, 2013 at 7:07 PM, Jothi <codeintheopen@gmail.com> wrote:
> > Is there a way to find out which CSV file that is currently being
> processed?
> > I mean I have a couple of CSV files and I do not know the name of those
> CSV
> > files. All I know is their structure. If it was XML, I can identify the
> file
> > structure using xpath. Is there something similar that I can do for CSV
> > files? The first line always contains the name of the fields. Of course I
> > can hard code the fields and do a string comparison, but I feel this to
> be a
> > bit ugly. Is there an elegant way?
> >
> > Regards,
> > Joe
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/CSV-files-processing-tp5735470.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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message