Solved

How to Zip a file which downloaded through HTTPCaller


Badge

Hello Team,

Present i am working on the FME Version: FME(R) 2015.1.1.0 (20150715 - Build 15515 - WIN64).

I could able to zip a downloaded file through HTTPcaller by using feature reader and single writer(text file) in independent workspace. Selected output as compressed Zipoutput in the writer parameters.

But when i did the same thing with my master workspace which is having a custom transformers and ArcSDE writer at that time i am getting output as text file with the .zip extension which is not compressed. I assume that output just updated with .zip extension and it got corrupted. Can somebody help me to resolve the issue??

 

Thanks..

Nagendra

icon

Best answer by chrisatsafe 15 July 2019, 20:42

View original

3 replies

Badge +2

Hi @nshetty,

Have you tried using the FME Hub ZipArchiver transformer for this? That way you wouldn't need to read the files in with a FeatureReader (at least in the first example you gave). You can do the same for zipping the text file(s).

Are you currently using a Text File Writer and zipping the output? Does the translation log indicate any errors?

Badge

Hi @nshetty,

Have you tried using the FME Hub ZipArchiver transformer for this? That way you wouldn't need to read the files in with a FeatureReader (at least in the first example you gave). You can do the same for zipping the text file(s).

Are you currently using a Text File Writer and zipping the output? Does the translation log indicate any errors?

Thanks@chrisatsafe, Done my job with ZipArchiver. But i have one small query,

Can we delete input file after zipping?

Badge +2

Thanks@chrisatsafe, Done my job with ZipArchiver. But i have one small query,

Can we delete input file after zipping?

Hi @nag,

Yes, you can delete the input after zipping by using the File/Copy writer. Check out Mark's answer on how to perform this task in this thread: https://knowledge.safe.com/answers/28113/view.html

I believe the only thing you will need to change is the filecopy_source_dataset attribute value to point to the data you are reading in. And just to re-iterate Mark's point, please test this before using this on your actual dataset.

Note: using something like the FeatureHolder after the ZipArchiver might also be helpful in case you want to ensure everything is zipped before deleting the file(s)

Reply