My csv files have header in the first line. Loading them into pig create a mess on any subsequent functions (like SUM). As of today I first apply a filter on the loaded data to remove the rows containing the headers :
affaires = load 'affaires.csv' using PigStorage(',') as (NU_AFFA:chararray, date:chararray) ;
affaires = filter affaires by date matches '../../..';
I think it is a bit stupid as a method, and I am wondering either there is a way to tell pig not to load the first line of the csv, like a "as_header" boolean parameter to the load function. I don't see it on the doc. What would be a best practice ? How do you usually deal with that ??