How to process file with header


3 Answer(s)


Hi Sachin,
Please check the below link:
http://jayunit100.blogspot.in/2013/07/hadoop-processing-headers-in-mappers.html

Hope this helps.
Thanks

Hi,

You can check if the value of a particular element is numeric only then use the line
OR
you can check if the any of the elements in the token has a certain string value that you know exists.

Hope this helps.

Thank you

Thanks guys.

Viquar,
Sure that approach is the last resort. However in practical world we will have plenty of files to process from mapper perspective and to keep writing such conditional code for every input just to omit header, would be cumbersome. I was hoping if this could be managed via configuration or something else. Something that we usually see in connection strings where we specify "HEADER=TRUE" or something.