Four Stars

Timestamp in tFileOutput


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

Ten Stars

Re: Timestamp in tFileOutput

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.