Solved

Is it posible to use one DateTimeStamper for more than one output

  • 18 August 2021
  • 3 replies
  • 1 view

I use this guide to add the date to my output file and foldernames:

https://community.safe.com/s/article/including-dates-into-the-names-of-output-files-or

 

Works like a charm but slows down my fme with large datasets. Now I don't need the DateTimestamp in my data, only in the filename. So I wonder if there is a way to re-use one DateTimestamp for more than one output.

  • All the outputs use the same Writer
  • All outputs have a different input
  • I don't need the datetimestamp in the data

 

Small test model how it is now (and works):DateTimeStamper_1How I would want it (but doesn't work like this):

DateTimeStamper_2The second version is 40% faster than the first...

icon

Best answer by nielsgerrits 18 August 2021, 14:30

View original

3 replies

Userlevel 5
Badge +25

Yes, in fact, you can set it up with only one DateTimeStamper that's only triggered once:

Set up a Creator and a DateTimeStamper. The Creator triggers once when the workspace starts and creates a no-geometry feature that then gets a DateTimeStamp. Run that through a FeatureMerger with your actual data so that the single feature with the DateTImeStamp goes in as a Supplier and your data as Requestor. In the parameters set the join keys to some static value on both sides (1 and 1 for example) so it will simply join everything.

This also circumvents the issue where some of your features end up with a different timestamp if the workspace runs too long 😃

Userlevel 6
Badge +32

You can also open the writer parameters and add something like

@Left(@DateTimeNow(),14)

in the target folder / name.

 

This is probably even faster because the FeatureMerger is a blocking transformer.

You can also open the writer parameters and add something like

@Left(@DateTimeNow(),14)

in the target folder / name.

 

This is probably even faster because the FeatureMerger is a blocking transformer.

Thx,

Both answers work but yours is very clean :)

Reply