Skip to main content
Solved

How to ensure unique output file names for self-serve FME Flow web apps and where to save them?

  • September 11, 2023
  • 2 replies
  • 157 views

vlroyrenn
Enthusiast
Forum|alt.badge.img+14

I have an FME workbench that writes to multiple Excel files (all contained within a single zip file) with the intent that the generated files will not really be stored, but merely returned as the output of an FME web app and discarded soon after. Having to write these files on-disk first means I have to consider "hygiene" between runs so that there's no risk of file name collision/overwriting, while also saving them in a location that is available for the FME Flow server to expose to the user via HTTP.

 

None of the documentation I could find really addresses where to save files meant for use with the "data download service", nor how to ensure that file paths cannot overlap between runs. Is there an FME Flow parameter for this purpose, like a unique run identifier I could add to my file names, or a private directory created only for the output of this run? I'm thinking of something like what TempPathnameCreator outputs, but not as a transformer, since it means I can't use it to parametrize the output paths of my writers. Even if it could, the directory is immediately deleted when the translation is complete, so the data download service couldn't use it.

 

Is this a feature that FME already covers and that I have yet to find, or am I better off using a Python scripted parameter and making some dynamic UUID path pointing to some shared data directory I would need to clean up manually every month?

Best answer by redgeographics

Are you publishing the workspace with the Data Download service? Because that will cover pretty much all of this automatically.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

redgeographics
Celebrity
Forum|alt.badge.img+62
  • Celebrity
  • Best Answer
  • September 12, 2023

Are you publishing the workspace with the Data Download service? Because that will cover pretty much all of this automatically.


vlroyrenn
Enthusiast
Forum|alt.badge.img+14
  • Author
  • Enthusiast
  • September 12, 2023

Are you publishing the workspace with the Data Download service? Because that will cover pretty much all of this automatically.

Ah, I figured I needed to configure my workbench in a specific way beforehand, given the output paths are user parameters and everything. It would have made more sense to me to have some hypothetical $(FME_SERVER_DOWNLOAD_DESTINATION) Flow parameter that you can build your paths out of and override with a placeholder value when running it with FME Form. I didn't think it would work like that.

 

Thanks for your answer.