Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm just learning Talend - using Open Studio (Integration) v7.3.1. I've come from a Data-Stage background. Have to say I'm very impressed so far with Talend - just a couple of sticking points ...
Is there a way to prompt for, say, a file name - but have the prompt default to a date (eg today's date) as a part of that filename (eg Filename_2021_06_15.csv).
I've tried context variables - with prompts - and I've tried to pre-populate them using tJava component or with the tContextLoad component - but I'm not achieving the desired result.
I've done a lot of Googling and searching in forums etc but nothing seems to address this - I would've thought this was a fairly common request.
Any ideas would be appreciated.
Cheers ... Bill
To set the filename like Filename_2021_06_15.csv, you can use the expression on tJava as below:
"Filename_"+TalendDate.formatDate("yyyy_MM-dd", TalendDate.getCurrentDate())+".csv"
Regards
Shong
Thanks Shong - I managed to get a job working with this.
I can't get it to populate a prompt with todays date - which the user could then override (at runtime) with a different date, to run a job for a different day ... but with a bit of re-organising of my process, I can make this work (minus the prompting, of course).
Cheers ... Bill