Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm trying to put the current timestamp in a tFileOutputDelemited at the end of a job.
I tried different way (globalMap - tmap - tFileOutput) without success.
There's probably an easy way to do this...
Martin F
I do this in a few jobs using tSetGlobalVar to create a variable named "timestamp" with a value of TalendDate.getDate("yyyyMMdd_HHmmss").
You can add the value to a flow with a tMap using the expression ((String)globalMap.get("timestamp"))
If you're not adding this value to an existing flow, you can create your own flow using tFixedFlowInput. Add a column to the component's schema then set its value with the same expression above.
I actually accomplished this within the tFileOuput in one line.
For example "C:/Talend/workspace/Out"+((String) TalendDate.getDate("yyyMMdd_HHmmss"))+".csv"