Csv dataset

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Csv dataset

Flavio Pompermaier

Hi all,
Is it possible to create a dataset from a csv and being able to access the header within map function?

Reply | Threaded
Open this post in threaded view
|

Re: Csv dataset

Fabian Hueske
No, not right now. All lines are treated equally.
You could parse the CSV as String tuple and convert all data yourself in a MapFunction, but the system won't tell you which line was the first one in the CSV.

2014-11-21 10:49 GMT+01:00 Flavio Pompermaier <[hidden email]>:

Hi all,
Is it possible to create a dataset from a csv and being able to access the header within map function?


Reply | Threaded
Open this post in threaded view
|

Re: Csv dataset

Stefano Bortoli
Maybe it is just a matter of reading it in the Main method, and pass it to the constructor of the map. Would that work?
Reply | Threaded
Open this post in threaded view
|

Re: Csv dataset

Stephan Ewen
Sure, that should work.

On Fri, Nov 21, 2014 at 11:53 AM, Stefano Bortoli <[hidden email]> wrote:
Maybe it is just a matter of reading it in the Main method, and pass it to the constructor of the map. Would that work?