Skip to main content
Question

How to get FME start timestamp and End Timestamp?


Forum|alt.badge.img
How to get FME start timestamp and End Timestamp?

8 replies

pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • March 10, 2016

Hi,

Where do you want to this info? Either in Log or in output or as attribute in translation?

Pratap


Forum|alt.badge.img
  • Author
  • March 10, 2016

as an attribute in translation...wanna insert the same record in to table using python


Forum|alt.badge.img
  • Author
  • March 10, 2016
pratap wrote:

Hi,

Where do you want to this info? Either in Log or in output or as attribute in translation?

Pratap

as an attribute in translation...wanna insert the same record in to table using python


david_r
Evangelist
  • March 10, 2016

Hi

In the shutdown script, you can access the elapsed run time using something like:

import fme
print "Workspace was running for %.1f seconds" % fme.elapsedRunTime

David


pratap
Contributor
Forum|alt.badge.img+11
  • Contributor
  • March 10, 2016

Hi,

TimeStamper transformer will create an attribute in translation .

Pratap


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • March 10, 2016

TimeStamper will get you the time.

To create a start time use a Creator transformer followed by the TimeStamper and set the Creator parameter to run before the readers.

Then repeat these transformers and set the Creator to run at the end to get the end time.


david_r
Evangelist
  • March 10, 2016
erik_jan wrote:

TimeStamper will get you the time.

To create a start time use a Creator transformer followed by the TimeStamper and set the Creator parameter to run before the readers.

Then repeat these transformers and set the Creator to run at the end to get the end time.

Just a heads up. If I'm not mistaken, the Creator set to run at the end will still fire before the writers have terminated, so the time won't be the same as the one stated in the FME log file.


tim_wood
Contributor
Forum|alt.badge.img+8
  • Contributor
  • October 26, 2016
david_r wrote:

Just a heads up. If I'm not mistaken, the Creator set to run at the end will still fire before the writers have terminated, so the time won't be the same as the one stated in the FME log file.

I tested this in one of my existing Workspaces which reads from a File Geodatabase, goes through Sorter then DuplicateFilter then writes bcak to the same File Geodatabase and also creates a CSV log file.

 

I added two Creators, one with Create at end set to No and the other to Yes, each followed by a TimeStamper.

 

The Translation log starts at 12:36:39.

 

The TimeStamper after the first Creator (Create at end = No) output a time of 12:36:42, which is the same time the FGDB feature class starts being read.

 

The TimeStamper after the second Creator (Create at end = Yes) output a time of 12:37:30 which is when the Sorter finishes. 1 second later the Writer starts writing features.

 

The Translation log ends at 12:40:23.

 

As I discovered with the LogMessageStreamer, I believe that Create at end will not be the actual end of translation i.e. the time of the last line in the Translation log, but when all the Transformers in the Workspace have done their stuff and the Writers kick off.

 

https://knowledge.safe.com/questions/30394/capture-translation-log.html

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings