Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Timestamp in tFileOutput

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

Labels (2)
2 Replies
cterenzi
Specialist
Specialist

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.

Anonymous
Not applicable
Author

I actually accomplished this within the tFileOuput in one line.

For example "C:/Talend/workspace/Out"+((String) TalendDate.getDate("yyyMMdd_HHmmss"))+".csv"