How to process file with header
3 Answer(s)
Abhijit-Dezyre Support
Hi Sachin,
Please check the below link:
http://jayunit100.blogspot.in/2013/07/hadoop-processing-headers-in-mappers.html
Hope this helps.
Thanks
Feb 17 2016 02:15 AM
Please check the below link:
http://jayunit100.blogspot.in/2013/07/hadoop-processing-headers-in-mappers.html
Hope this helps.
Thanks
Viquar
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
Feb 17 2016 03:01 AM
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
SACHIN
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.
Feb 17 2016 03:38 AM
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.