One Star

Adding Date to File Name

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".
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())