Skip to main content

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.

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

 


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).


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!


Reply