Question

Is there a way a writer can create a new file with a new name to reflect any updates instead of just overwriting the current one?


Badge

I have workspaces looking a data quality which are automated on fme server. I am looking to record the monthly number updates from the workspaces and was wondering is there a way a writer can create a new file with a new name (e.g jan 2023 or Feb 2023) instead of just overwriting the current one?


5 replies

Userlevel 3
Badge +16

Yes, you can use either workspace parameters or attribute values in the filename. On a regular Writer you may have to fanout to write out to different files based on attribute values, so a FeatureWriter can be easier for outputting to multiple files imo. The DateTimeConverter is just to get the month/year from the timestamp.

image

Badge

Thanks for your response @ctredinnick​. The date time converter does not seem to be converting the timestamp, still showing in same format once the data has ran through the converter.

imageBelow shows how the timestamp looks in the output of the date time converter

image 

 

Userlevel 4
Badge +36

Behind Datetime Attributes, you should simply point to the attribute _timestamp (not @Value(_timestamp)), by choosing it from the list of attributes.

DateTimeConverter_Parameters

Badge

Behind Datetime Attributes, you should simply point to the attribute _timestamp (not @Value(_timestamp)), by choosing it from the list of attributes.

DateTimeConverter_Parameters

I am trying to write my data to a SQL table where it shows weekly number updates. The number and timestamp write out okay for the first record but after this just the weekly number writes out and the timestamp is blank. Any ideas why this is happening?

Writer Set Up

Userlevel 3
Badge +16

I am trying to write my data to a SQL table where it shows weekly number updates. The number and timestamp write out okay for the first record but after this just the weekly number writes out and the timestamp is blank. Any ideas why this is happening?

Writer Set Up

If you're updating on timestamp, then is it possible all input features with the same timestamp are updating the same row in the SQL table? Maybe you could set it to Upsert (insert if timestamp does not exist)

Reply