Skip to main content
Solved

Can't retrieve data url with data download service when I "manually" write data into the FME_SERVER_DEST_DIR

  • August 9, 2023
  • 3 replies
  • 168 views

I made a workbench which takes a .zip folder as a source, which contains .csv files, and sometimes an 'attachment' folder which contains images or videos. The output is an xlsx file, a dxf file and if there is an 'attachment' folder, this 'attachment' folder.

This workbench will be used through a workbench app in FME Server, the xlsx and th dxf data can be retrieved from the 2 featurewriters via the data downlaod service, but I have no idea of how to read and write a folder with file extensions I can't know. The only solution I see is to move the folder.

So I made a python script which unzip the entry file, check if there is a 'attachment' folder, and if so, move it to 'FME_SERVER_DEST_DIR', so it can be downloaded from the url with the xlsx and the dxf.

 

Here's my problem. With a .zip file with only .csv file and no 'attachments' folder, there is no problem, I get my url to download the data and I get the xlsx and the dxf. But if there is a 'attachments' folder, the workbench is completed, no failure, but I do not get a download url.

Best answer by kate-safe

Thank you for your post @paulantoine57​ !

When running the workspace in Workbench, does it run correctly without any errors or warnings? If possible, are you able to share your workspace template, with some sample data/folders so that I can try to reproduce this and see what might be going on here? As well, when you run the workspace on FME Flow, can you send me the completed job log so I can see if anything is going on there as well?

Thank you!

Kate

 

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.

3 replies

kate-safe
Safer
Forum|alt.badge.img+10
  • Safer
  • 52 replies
  • Best Answer
  • August 9, 2023

Thank you for your post @paulantoine57​ !

When running the workspace in Workbench, does it run correctly without any errors or warnings? If possible, are you able to share your workspace template, with some sample data/folders so that I can try to reproduce this and see what might be going on here? As well, when you run the workspace on FME Flow, can you send me the completed job log so I can see if anything is going on there as well?

Thank you!

Kate

 


  • Author
  • 1 reply
  • August 10, 2023

Thank you for your post @paulantoine57​ !

When running the workspace in Workbench, does it run correctly without any errors or warnings? If possible, are you able to share your workspace template, with some sample data/folders so that I can try to reproduce this and see what might be going on here? As well, when you run the workspace on FME Flow, can you send me the completed job log so I can see if anything is going on there as well?

Thank you!

Kate

 

Thanks for your reply !

 

After working on my problem this morning I realized that $(FME_SERVER_DEST_DIR) isn't the directory that the data download service will compress, it's the compressed file itself.

Since the beginning I was trying to write my files to $(FME_SERVER_DEST_DIR) directly, but the solution was to make a python script that unzip the $(FME_SERVER_DEST_DIR), zip all my files together and then replace the $(FME_SERVER_DEST_DIR) with my zip (in fact, remove the original $(FME_SERVER_DESt_DIR), then move my .zip from my temp folder to $(FME_SERVER_DEST_DIR).


kate-safe
Safer
Forum|alt.badge.img+10
  • Safer
  • 52 replies
  • August 11, 2023

Thanks for your reply !

 

After working on my problem this morning I realized that $(FME_SERVER_DEST_DIR) isn't the directory that the data download service will compress, it's the compressed file itself.

Since the beginning I was trying to write my files to $(FME_SERVER_DEST_DIR) directly, but the solution was to make a python script that unzip the $(FME_SERVER_DEST_DIR), zip all my files together and then replace the $(FME_SERVER_DEST_DIR) with my zip (in fact, remove the original $(FME_SERVER_DESt_DIR), then move my .zip from my temp folder to $(FME_SERVER_DEST_DIR).

Wonderful! Glad to hear you have things working correctly now!