How can I get the current date so that I can append it in dynamically changing file paths or in FILTER statements in PigLatin scripts?
E.g. A = LOAD '/data/$current_date/file.csv' ;
B = FILTER relation1 BY Date == ($current_date-1);
%default current_date `date +%Y-%m-%d`; (This will create the date in yyyy-mm-dd format)
now you can refer the date by inserting $current_date in the string:
LOAD '/data/$current_date/file.csv' ;