I have a file which contains entries like this:
1,1,07 2012,07 2013,11,blablabla
The two first fields are ids. The third is the begin date(month year) and the fourth is the end date. The fifth field is the number of months btweens these two dates. And the last field contains text.
Here is my pig code to load this data:
f = LOAD 'file.txt' USING PigStorage(',') AS (id1:int, id2:int, date1:chararray, date2:chararray, duration:int, text:chararray);
I would like to filter my file so that I keep only the entries where date2 is less than three years from today. Is it possible to that in Pig ?
Thanks.