Skip to main content
Hi,

 

 

Me again. I want to use the date and time the workspace is run as the output file name.

 

 

At the moment, I am using a creator, timestamper and featuremerger to add the datetime attribute, then using fanout dataset on the datetime.

 

 

This seems a bit of a clumsy way of doing it, as the featuremerger is slow when processing lots of features.

 

 

Can anyone think of a better way? Really I want to tag all features with the same value. I could do this by creating a published parameter, but cant think how to populate it with date/time.

 

 

Thanks,

 

 

Owen
Put a Creator right at the front of your workspace (create 1 feature and ensure Create At End is set to No, so the Create is the first thing that happens) with a Timestamper going into a VariableSetter. That will set a variable to the first few moments after the workspace was triggered to run.

 

 

Then do stuff...

 

 

...and at the end use a VariableRetriever to get your value and pin it onto 1 or more features and use it as the attribute to fanout on. See below:

 

 

 


Hi Owen,

 

 

Creating the date/time on the features (and formating it accordingly) prevents the merging.

 

Hope this helps.
GoldenRetrievers! Thanks dave.

 

 

Itay- yes you're right, and I tried that to begin with, but it wasnt giving me a unique date/time value, so had multiple fanouts for each minute, etc.
Hi Owen,

 

 

You could use a scripted published parameter as the feature type name. The following Python code returns the date & time:

 

 

import datetime

 

now = datetime.datetime.now()   # get date & time

 

return now.strftime("%Y%m%d_%H%M")   # format the time string

 

 

In the Feature Type Properties enter as FeatureType Name: $(NameOfThePublishedParameter)

Reply