Adding Date to File Name

One Star

Adding Date to File Name

Hi,
I am using tPigStore_Result component for Storing Pig Result.But In that i need the file to be saved based on date.
For E.g. i need to store result on location "hdfs://XXX.XX.XXX.XX:8020/user/user/Talend/Output/Result_10102010" (Where 10102013 is current date). if i run the same program on 11102013 then the output should be stored @ "hdfs://XXX.XX.XXX.XX:8020/user/user/Talend/Output/Result_11102010".
Regards,
Bhagwant Bhobe
Seventeen Stars

Re: Adding Date to File Name

You have to build the file name for your self using the build-in Talend routine
"hdfs://XXX.XX.XXX.XX:8020/user/user/Talend/Output/Result_" + TalendDate.formatDate("ddMMyyyy", TalendDate.getCurrentDate())